User prompt
Fix Bug: 'Uncaught TypeError: this.well.createAsset is not a function' in this line: 'this.wellGraphics = this.well.createAsset('well', 'Well Graphics', .5, .5);' Line Number: 299
User prompt
Improve
User prompt
Fix Bug: 'Uncaught ReferenceError: House is not defined' in this line: 'var house = new House();' Line Number: 489
User prompt
Improve
User prompt
Improve
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of null (reading 'addChild')' in this line: 'self.parent.addChild(villager);' Line Number: 273
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of null (reading 'addChild')' in this line: 'self.parent.addChild(villager);' Line Number: 273
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of null (reading 'addChild')' in this line: 'self.parent.addChild(villager);' Line Number: 271
User prompt
Improve
User prompt
Improve
User prompt
Improve the code
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 475
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 445
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 475
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 445
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 475
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 445
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 475
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 445
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 475
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 445
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 475
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 445
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 475
User prompt
Fix Bug: 'Uncaught TypeError: self.initializeHouses is not a function' in this line: 'self.initializeHouses();' Line Number: 447
===================================================================
--- original.js
+++ change.js
@@ -303,8 +303,21 @@
WellBehavior.prototype.drinkWater = function (villager) {
villager.tiredness -= 5;
if (villager.tiredness < 0) villager.tiredness = 0;
};
+var WellBehavior = function (well) {
+ this.well = well;
+};
+WellBehavior.prototype.initialize = function () {
+ this.wellGraphics = LK.getAsset('well', 'Well Graphics', .5, .5);
+ this.well.addChild(this.wellGraphics);
+ this.well.x = 2048 / 2 - 800;
+ this.well.y = 2732 / 2 - 600;
+};
+WellBehavior.prototype.drinkWater = function (villager) {
+ villager.tiredness -= 5;
+ if (villager.tiredness < 0) villager.tiredness = 0;
+};
Well.prototype.behavior = new WellBehavior(this);
Well.prototype.initialize = function () {
this.behavior.initialize();
};
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.