User prompt
make the plain visible
User prompt
make the plain apair
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'forEach')' in this line: 'this.enemies.forEach(function (enemy) {' Line Number: 107
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'forEach')' in this line: 'this.enemies.forEach(function (enemy) {' Line Number: 107
User prompt
optimise the fluidity
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'score')' in this line: 'self.parent.score++;' Line Number: 78
User prompt
optimise the framerate
User prompt
Fix Bug: 'ReferenceError: goldTxt is not defined' in this line: 'goldTxt.setText(self.gold.toString());' Line Number: 140
User prompt
retry
User prompt
Fix Bug: 'ReferenceError: goldTxt is not defined' in this line: 'goldTxt.setText(this.parent.gold.toString());' Line Number: 78
User prompt
add 50 gold by enemy destroy
User prompt
create a framerate counter and show the framerate off the game
User prompt
Optimise the framerate off the game
User prompt
Optimise the framerate
User prompt
When no enemy remain, start a new round with twice the enemy thant the previous round
User prompt
Update the gold text every time a tower is create
User prompt
show the golf in a yellow text at the top left of the screen
User prompt
Create a gold ressource. Every tower cost 50 golf to be create. The tower is not create when you have not enough gold
User prompt
At the start of the game, there is no tower. When a player click somewhere on the screen, make a tower apair
User prompt
Make a score text apair at the top on the screen and increment it by one at every enemy destroy
User prompt
Destroy the enemy when touch by the bullet
User prompt
Only one enemy apair
User prompt
bullet move to the right
User prompt
the bullet move to the left
User prompt
make the size of the plain 60 percent higher
===================================================================
--- original.js
+++ change.js
@@ -53,8 +53,15 @@
};
});
var Game = Container.expand(function () {
var self = Container.call(this);
+ self.score = 0;
+ var scoreTxt = new Text2(self.score.toString(), {
+ size: 150,
+ fill: "#ffffff"
+ });
+ scoreTxt.anchor.set(0.5, 0);
+ LK.gui.topCenter.addChild(scoreTxt);
LK.stageContainer.setBackgroundColor(0xFFFFFF);
var towers = [];
var enemies = [];
self.bullets = [];
@@ -85,8 +92,10 @@
for (var j = enemies.length - 1; j >= 0; j--) {
if (self.bullets[i].intersects(enemies[j])) {
enemies[j].destroy();
enemies.splice(j, 1);
+ self.score++;
+ scoreTxt.setText(self.score.toString());
self.bullets[i].destroy();
self.bullets.splice(i, 1);
break;
}
A plain in a comic style with a dirt road with 4 turn staring to top to the botom see from a top and 50 meter high view Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tower shooting at enemy in a modern style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A single soldat walking downard in a 16 bit style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.