User prompt
Fix Bug: 'Uncaught TypeError: self.initializeClouds is not a function' in this line: 'self.initializeClouds();' Line Number: 413
User prompt
Fix Bug: 'Uncaught TypeError: self.initializeHouses is not a function' in this line: 'self.initializeHouses();' Line Number: 454
User prompt
Fix Bug: 'Uncaught TypeError: self.populateVillage is not a function' in this line: 'self.populateVillage();' Line Number: 429
User prompt
Fix Bug: 'Uncaught TypeError: self.populateVillage is not a function' in this line: 'self.populateVillage();' Line Number: 429
User prompt
Fix Bug: 'Uncaught TypeError: self.initializeClouds is not a function' in this line: 'self.initializeClouds();' Line Number: 413
User prompt
Fix Bug: 'Uncaught TypeError: self.initializeClouds is not a function' in this line: 'self.initializeClouds();' Line Number: 413
User prompt
Optimise
User prompt
Improve
User prompt
Improve
User prompt
Fix Bug: 'Uncaught ReferenceError: EmployingWorkPlace is not defined' in this line: 'var workplace = new EmployingWorkPlace();' Line Number: 423
User prompt
Fix Bug: 'Uncaught ReferenceError: ResourceDisplay is not defined' in this line: 'self.resourceDisplay = new ResourceDisplay(self.resources);' Line Number: 336
User prompt
Improve
User prompt
Improve villager mouvement for making them go where they want to go
User prompt
Villager move 4 time speeder
User prompt
Make villager move base on their iq
User prompt
Foc villager dont moving
User prompt
Fix
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 416
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 416
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 416
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 416
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 416
User prompt
Fix Bug: 'Uncaught ReferenceError: houses is not defined' in this line: 'houses.push(house);' Line Number: 416
User prompt
Fix
User prompt
Fix
===================================================================
--- original.js
+++ change.js
@@ -23,42 +23,17 @@
self.foodResource = foodResource;
});
var Well = Container.expand(function () {
var self = Container.call(this);
- var wellGraphics = self.createAsset('well', 'Well Graphics', .5, .5);
- self.x = 2048 / 2 - 800;
- self.y = 2732 / 2 - 600;
- self.drinkWater = function (villager) {
- villager.tiredness -= 5;
- if (villager.tiredness < 0) villager.tiredness = 0;
- };
+ self.initialize();
});
var Bakery = Container.expand(function () {
var self = Container.call(this);
- var bakeryGraphics = self.createAsset('bakery', 'Bakery Graphics', .5, .5);
- self.x = 2048 / 2 + 800;
- self.y = 2732 / 2 - 300;
- self.sellBread = function (villager) {
- if (villager.gameResources.food.amount >= 5) {
- villager.gameResources.food.amount -= 5;
- villager.energy += 10;
- if (villager.energy > 100) villager.energy = 100;
- }
- };
+ self.initialize();
});
var Cloud = Container.expand(function () {
var self = Container.call(this);
- var cloudGraphics = self.createAsset('cloud', 'Cloud Graphics', .5, .5);
- cloudGraphics.alpha = 0.5;
- self.x = Math.random() * 2048;
- self.y = Math.random() * 2732;
- self.speed = Math.random() * 2 + 1;
- self.move = function () {
- self.x += self.speed;
- if (self.x > 2048) {
- self.x = -cloudGraphics.width;
- }
- };
+ self.initialize();
});
var School = Container.expand(function () {
var self = Container.call(this);
var schoolGraphics = self.createAsset('school', 'School Graphics', .5, .5);
@@ -252,8 +227,42 @@
});
var EmployingWorkPlace = Container.expand(function () {
var self = Container.call(this);
});
+Well.prototype.initialize = function () {
+ this.wellGraphics = this.createAsset('well', 'Well Graphics', .5, .5);
+ this.x = 2048 / 2 - 800;
+ this.y = 2732 / 2 - 600;
+};
+Well.prototype.drinkWater = function (villager) {
+ villager.tiredness -= 5;
+ if (villager.tiredness < 0) villager.tiredness = 0;
+};
+Bakery.prototype.initialize = function () {
+ this.bakeryGraphics = this.createAsset('bakery', 'Bakery Graphics', .5, .5);
+ this.x = 2048 / 2 + 800;
+ this.y = 2732 / 2 - 300;
+};
+Bakery.prototype.sellBread = function (villager) {
+ if (villager.gameResources.food.amount >= 5) {
+ villager.gameResources.food.amount -= 5;
+ villager.energy += 10;
+ if (villager.energy > 100) villager.energy = 100;
+ }
+};
+Cloud.prototype.initialize = function () {
+ this.cloudGraphics = this.createAsset('cloud', 'Cloud Graphics', .5, .5);
+ this.cloudGraphics.alpha = 0.5;
+ this.x = Math.random() * 2048;
+ this.y = Math.random() * 2732;
+ this.speed = Math.random() * 2 + 1;
+};
+Cloud.prototype.move = function () {
+ this.x += this.speed;
+ if (this.x > 2048) {
+ this.x = -this.cloudGraphics.width;
+ }
+};
DayNightCycleManager.prototype.createTimeOfDayText = function () {
var text = new Text2('', {
size: 50,
fill: "#ffffff"
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.