User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 456
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 429
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 456
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 429
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 456
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 429
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 456
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'this.workplaces.push(workplace);' Line Number: 442
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'this.workplaces.push(workplace);' Line Number: 442
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'this.workplaces.push(workplace);' Line Number: 442
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'this.workplaces.push(workplace);' Line Number: 442
User prompt
fix
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(newHouse);' Line Number: 433
User prompt
fix
User prompt
Fix Bug: 'Uncaught TypeError: self.initializeVillager is not a function' in this line: 'self.initializeVillager();' Line Number: 181
User prompt
fix
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 472
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 471
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 471
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 471
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 471
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 471
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 471
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 471
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in this line: 'self.villagerAndFramerateDisplay.update();' Line Number: 471
===================================================================
--- original.js
+++ change.js
@@ -272,28 +272,8 @@
}
;
};
});
-Villager.prototype.initializeVillager = function () {
- this.targetX = null;
- this.targetY = null;
- this.home = null;
- this.workplace = null;
- this.resourceType = null;
- this.speed = 12;
- this.directionX = 1;
- this.directionY = 1;
- this.carriedWood = 0;
- this.carriedRock = 0;
- this.carriedFood = 0;
- this.tiredness = 0;
- this.iq = 100;
- this.currentAction = null;
- this.decideNextAction = function () {};
- this.canFallInLove = function (otherVillager) {
- return true;
- };
-};
Villager.prototype.isDoingSomething = function () {
return this.currentAction !== null;
};
Villager.prototype.initializePosition = function (x, y) {
@@ -399,9 +379,28 @@
};
}
Game.prototype.createVillager = function (x, y, isBaby) {
var villager = new Villager(this.resources);
- villager.initializePosition(x, y);
+ villager.x = x;
+ villager.y = y;
+ villager.targetX = null;
+ villager.targetY = null;
+ villager.home = null;
+ villager.workplace = null;
+ villager.resourceType = null;
+ villager.speed = 12;
+ villager.directionX = 1;
+ villager.directionY = 1;
+ villager.carriedWood = 0;
+ villager.carriedRock = 0;
+ villager.carriedFood = 0;
+ villager.tiredness = 0;
+ villager.iq = 100;
+ villager.currentAction = null;
+ villager.decideNextAction = function () {};
+ villager.canFallInLove = function (otherVillager) {
+ return true;
+ };
if (isBaby) {
villager.scale.x = 0.5;
villager.scale.y = 0.5;
}
A background of a paysage with plain and without tree or montainbut no water see from the top in the air 100m by 100m Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
One human medieval villager in a warcraft 2 style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a house in a warcraft 2 style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tree a rock and crambery in a RTS style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A heart comic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cloud in a comic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A market in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An Inn in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An school in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An bakery in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A well in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tree in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An apple in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A rock in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A home in a RTS and fantasy style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A brewery in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A lumberjack in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a marketplace in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a festival in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.