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
@@ -1,11 +1,19 @@
var Romance = Container.expand(function () {
var self = Container.call(this);
});
-var ResourceDisplay = Container.expand(function (resources) {
+var WoodDisplay = Container.expand(function (woodResource) {
var self = Container.call(this);
- self.resources = resources;
+ self.woodResource = woodResource;
});
+var RockDisplay = Container.expand(function (rockResource) {
+ var self = Container.call(this);
+ self.rockResource = rockResource;
+});
+var FoodDisplay = Container.expand(function (foodResource) {
+ var self = Container.call(this);
+ 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;
@@ -184,25 +192,27 @@
var self = Container.call(this);
self.gameResources = resources;
self.iq = iq;
var villagerGraphics = self.createAsset('villager', 'Villager Graphics', .5, .5);
- self.moveTo = function (targetX, targetY) {
+ self.moveTo = function (targetX, targetY, speed) {
var dx = targetX - self.x;
var dy = targetY - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 0) {
- var speedMultiplier = self.iq / 100;
- self.x += dx / distance * speedMultiplier;
- self.y += dy / distance * speedMultiplier;
+ var moveDistance = Math.min(speed, distance);
+ self.x += dx / distance * moveDistance;
+ self.y += dy / distance * moveDistance;
}
};
+ Villager.prototype.setSpeed = function (iq) {
+ this.speed = iq / 100;
+ };
self.decideNextAction = function () {};
});
-var EmployingWorkPlace = Container.expand(function () {
+var EmploymentManager = Container.expand(function () {
var self = Container.call(this);
- var workplaceGraphics = self.createAsset('workplace', 'Workplace Graphics', .5, .5);
self.isEmploying = true;
- self.employ = function (villager) {};
+ self.employVillager = function (villager, workplace) {};
});
var House = Container.expand(function () {
var self = Container.call(this);
House.prototype.scheduleVillagerWork = function (villager) {
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.