User prompt
Fix Bug: 'TypeError: villagerA.kiss is not a function' in this line: 'villagerA.kiss(villagerB);' Line Number: 331
User prompt
Fix
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 407
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'self.self.houses.push(house);' Line Number: 386
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 407
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'self.self.houses.push(house);' Line Number: 386
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 407
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'self.self.houses.push(house);' Line Number: 386
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 407
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'self.self.houses.push(house);' Line Number: 386
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 407
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 386
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 407
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 386
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 407
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'this.workplaces.push(workplace);' Line Number: 398
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(newHouse);' Line Number: 389
User prompt
fix
User prompt
fix villager dont moving
User prompt
Fix Bug: 'Uncaught ReferenceError: ResourceDisplay is not defined' in this line: 'self.resourceDisplay = new ResourceDisplay(self.resources);' Line Number: 312
User prompt
Fix Bug: 'Uncaught ReferenceError: FramerateDisplay is not defined' in this line: 'self.framerateDisplay = new FramerateDisplay();' Line Number: 311
User prompt
fix
User prompt
make the background visible
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 'houses')' in this line: 'this.self.houses.push(house);' Line Number: 429
===================================================================
--- original.js
+++ change.js
@@ -206,74 +206,8 @@
villager.home = this;
this.scheduleVillagerWork(villager);
};
});
-var ResourceDisplay = Container.expand(function (gameResources) {
- var self = Container.call(this);
- self.gameResources = gameResources || ({
- wood: {
- amount: 0
- },
- rock: {
- amount: 0
- },
- food: {
- amount: 0
- }
- });
- var resourceDisplayText = new Text2('', {
- size: 50,
- fill: "#ffffff"
- });
- resourceDisplayText.anchor.set(0.5, 0);
- resourceDisplayText.x = 2048 / 2 - 800 - 500 + 100;
- resourceDisplayText.y = 50;
- LK.gui.topCenter.addChild(resourceDisplayText);
- self.update = function () {
- resourceDisplayText.setText('Resources: Wood ' + self.gameResources.wood.amount + ' units, Rock ' + self.gameResources.rock.amount + ' units, Food ' + self.gameResources.food.amount + ' units');
- };
-});
-var VillagerDisplay = Container.expand(function (game) {
- var self = Container.call(this);
- self.villagers = game.villagers;
- var villagerCountText = new Text2('', {
- size: 50,
- fill: "#ffffff"
- });
- villagerCountText.anchor.set(0.5, 0);
- villagerCountText.x = 2048 / 2 - 200;
- villagerCountText.y = 50;
- LK.gui.topCenter.addChild(villagerCountText);
- self.update = function () {
- villagerCountText.setText('Villagers: ' + (self.villagers ? self.villagers.length : 0));
- };
-});
-var FramerateDisplay = Container.expand(function () {
- var self = Container.call(this);
- var framerateText = new Text2('', {
- size: 50,
- fill: "#ffffff"
- });
- framerateText.anchor.set(0, 1);
- framerateText.x = 500;
- framerateText.y = 2732;
- LK.gui.topCenter.addChild(framerateText);
- var lastTick = LK.ticks;
- var frameCount = 0;
- var lastSecond = Math.floor(lastTick / 60);
- self.update = function () {
- var currentTick = LK.ticks;
- var currentSecond = Math.floor(currentTick / 60);
- frameCount++;
- if (currentSecond > lastSecond) {
- framerateText.setText('FPS: ' + frameCount);
- framerateText.visible = true;
- frameCount = 0;
- lastSecond = currentSecond;
- }
- ;
- };
-});
Villager.prototype.initializeVillager = function () {
this.targetX = null;
this.targetY = null;
this.home = null;
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.