Fixed
This commit is contained in:
parent
7ec6389141
commit
0cfc587fd0
|
|
@ -168,11 +168,14 @@ class Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//var bodenvorkommen = ["copper","stonecoal","browncoal",""]
|
||||||
|
|
||||||
class Factory {
|
class Factory {
|
||||||
constructor(tier) {
|
constructor(tier) {
|
||||||
this.tier = tier
|
this.tier = tier
|
||||||
if (this.tier == undefined)
|
if (this.tier == undefined)
|
||||||
this.tier = 0
|
this.tier = 0
|
||||||
|
|
||||||
this.tiles = []
|
this.tiles = []
|
||||||
this.items = []
|
this.items = []
|
||||||
for (var x = 0; x < 25; x++) {
|
for (var x = 0; x < 25; x++) {
|
||||||
|
|
@ -186,7 +189,7 @@ class Factory {
|
||||||
moveItems() {
|
moveItems() {
|
||||||
for (var i = 0; i < this.items.length; i++) {
|
for (var i = 0; i < this.items.length; i++) {
|
||||||
this.items[i].move()
|
this.items[i].move()
|
||||||
if (this.items[i].x <= 0 || this.items[i].x >= 1200 || this.items[i].y <= 0 || this.items[i].y >= 576) {
|
if (this.items[i].x < 0 || this.items[i].x >= 1200 || this.items[i].y < 0 || this.items[i].y >= 576) {
|
||||||
console.log("removed Item")
|
console.log("removed Item")
|
||||||
this.deleteItem(this.items[i])
|
this.deleteItem(this.items[i])
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue