Code edit (5 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: player is not defined' in this line: 'enemy.shoot(player.X, player.Y);' Line Number: 223
Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'y')' in this line: 'if (bullet.y > game.height + bullet.height || bullet.x < -bullet.width || bullet.x > game.width + bullet.width) {' Line Number: 240
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'move')' in this line: 'bullet.move(heroShip.x, heroShip.y);' Line Number: 237
User prompt
add code to call move for all enemyBossShipBullets
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'move')' in this line: 'bullet.move();' Line Number: 211
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'move')' in this line: 'bullet.move();' Line Number: 209
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: enemyBossBullets is not defined' in this line: 'for (var i = enemyBossBullets.length - 1; i >= 0; i--) {' Line Number: 209
User prompt
add code to LK.on('tick', function () to call enemybossbullet move
User prompt
update enemybossship to shoot enemybossbullet after it reaches targetyY
User prompt
update enemybossbullet to move towards the player when spawned
User prompt
create a new asset callled enemybossbullet
Code edit (1 edits merged)
Please save this source code
User prompt
update enemybossship so it moves to game.height*(2/3) and then stops
User prompt
update the enemybossship to require 10 bullets to be destroyed
User prompt
update the code so only one enemybossship is spawned
User prompt
when the currentscore reaches 1000, spawn the enemyboss.
User prompt
add 100 to current score for every enemy destroyed by the player bullet
Code edit (1 edits merged)
Please save this source code
User prompt
display currentscore on the top left of the screen
User prompt
add two variables to the game. one that tracks the current score, and one that tracks high score
User prompt
call spawnEnemyShip at random intervals between 1 and 3 seconds
===================================================================
--- original.js
+++ change.js
@@ -134,8 +134,9 @@
// Initialize important asset arrays and score tracking
var heroBullets = [];
var enemyShips = [];
+var enemyBossBullets = [];
var currentScore = 0;
var highScore = 0;
var scoreDisplay = game.addChild(new ScoreDisplay());
scoreDisplay.x = 150;
a cute cool looking emoji face. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cute looking heart. bright red.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
an evil looking emoji. purple and blue colors.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a shiny blue cute star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A start button. White on Red.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a grey touchpad. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a bright yellow shiny cute star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.