User prompt
Undo the last chance
User prompt
Fix the sound bugs
User prompt
Destroy Jet when hit by enemy
User prompt
Remove health from UI
User prompt
Show players health in UI
User prompt
Destroy Jet after got hit by enemy bullets
User prompt
Fix the bug
User prompt
Spawn less enemies
User prompt
Add health items so the player can collect
User prompt
Make the enemy destroy VFX disappear after o.1 seconds
User prompt
Add enemy destroy VFX
User prompt
Bullets colliding sound
User prompt
Make enemy shoot
User prompt
Shooting sound for enemy bullet
User prompt
Fix the bug
User prompt
Enemy bullets sound
User prompt
Make the enemy shoot back
User prompt
Player can shoot
User prompt
Undo the last two changes
User prompt
Fix the bug
User prompt
Make the player shoot automatically
User prompt
Enemy can't shoot
User prompt
Make enemy Move slow
User prompt
Please fix the bug: 'TypeError: ufo.shoot is not a function' in or related to this line: 'ufo.shoot();' Line Number: 129
User prompt
Undo the last two changes
===================================================================
--- original.js
+++ change.js
@@ -131,8 +131,14 @@
fill: "#ffffff"
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
+var healthTxt = new Text2('Health: 3', {
+ size: 150,
+ fill: "#ffffff"
+});
+healthTxt.anchor.set(0.5, 0);
+LK.gui.topRight.addChild(healthTxt);
function spawnUFO() {
var ufo = new UFO();
ufo.x = Math.random() * 2048;
ufo.y = -ufo.height;
@@ -183,8 +189,9 @@
if (enemyBullets[i].intersects(jet)) {
enemyBullets[i].destroy();
enemyBullets.splice(i, 1);
jet.health -= 1;
+ healthTxt.setText('Health: ' + jet.health);
if (jet.health <= 0) {
LK.showGameOver();
}
break;
@@ -207,8 +214,9 @@
if (healthItems[i].intersects(jet)) {
healthItems[i].destroy();
healthItems.splice(i, 1);
jet.health += 1;
+ healthTxt.setText('Health: ' + jet.health);
break;
}
}
}
Fighter jet. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Ufo with green alien driving it. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Space with stars with earth background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Red round ball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Green round ball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel smoke. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Red Heart with plus symbol at centre. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.