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
@@ -341,9 +341,8 @@
self.timerText.x = 2048 - 500;
self.timerText.y = 2732;
LK.gui.topCenter.addChild(self.timerText);
self.startTime = Date.now();
- self.villagers = [];
var market = new Market();
self.addChild(market);
var inn = new Inn();
self.addChild(inn);
@@ -418,14 +417,8 @@
var cloud = new Cloud();
self.clouds.push(cloud);
self.cloudLayer.addChild(cloud);
}
- self.addVillager(self.createVillager(1024, 1366));
- for (var i = 0; i < 10; i++) {
- self.addVillager(self.createVillager(Math.random() * 2048, Math.random() * 2732));
- }
- self.market = new Market();
- self.addChild(self.market);
Game.prototype.createHouse = function (x, y) {
var house = new House();
house.x = x;
house.y = y;
@@ -434,9 +427,8 @@
Game.prototype.addHouse = function (house) {
this.addChild(house);
this.houses.push(house);
};
- var houses = [];
var newHouse = self.createHouse(2048 / 2, 2732 / 2);
self.addHouse(newHouse);
houses.push(newHouse);
Game.prototype.createWorkplace = function () {
@@ -448,9 +440,8 @@
Game.prototype.addWorkplace = function (workplace) {
this.addChild(workplace);
this.workplaces.push(workplace);
};
- self.workplaces = [];
var workplace = self.createWorkplace();
self.addWorkplace(workplace);
self.workplaces.push(workplace);
var house = new House();
@@ -465,22 +456,8 @@
self.addChild(workplace);
self.villagerCreationInterval = LK.setInterval(function () {
self.createAndAddVillagerIfPossible();
}, 10000);
- LK.on('tick', function () {
- var currentTime = Date.now();
- var elapsedTime = Math.floor((currentTime - self.startTime) / 1000);
- self.timerText.setText('Time: ' + elapsedTime);
- self.updateResourceDisplay();
- for (var i = 0; i < self.villagers.length; i++) {
- self.villagers[i].update();
- }
- self.handleVillagersFallingInLove();
- self.updateDayNightCycle();
- for (var i = 0; i < self.clouds.length; i++) {
- self.clouds[i].move();
- }
- });
self.updateDayNightCycle = function () {
var cycleDuration = 5000;
var time = (Date.now() - self.startTime) % cycleDuration;
var dayProgress = time / cycleDuration * 2 * Math.PI;
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.