User prompt
make score = enemies destroyed
User prompt
make the player win when all the enemies are destroyed
User prompt
make that
User prompt
Please fix the bug: 'ReferenceError: Enemy2 is not defined' in or related to this line: 'if (child instanceof Enemy || child instanceof Enemy2 || child instanceof Enemy3) {' Line Number: 131
User prompt
You can make the shots also destroy enemy2 and enemy3 but enemy4 will have to be shot 20 times to destroy them
User prompt
You can make the ship unable to go to the area where the button is
User prompt
can you make the shoot button appear after the first enemy exits the map
User prompt
can you make a shoot button and if you click it the asset shot will appear in front of the ship and destroy every enemy on its way
User prompt
You can make 1 in 100 enemies not move, have the texture of the Enemy4 asset and spawn Enemy3 every 5 seconds
User prompt
Please fix the bug: 'TypeError: counterGraphics.setText is not a function' in or related to this line: 'counterGraphics.setText(Math.floor(LK.ticks / 60));' Line Number: 22
User prompt
Please fix the bug: 'TypeError: self.setText is not a function' in or related to this line: 'self.setText(LK.ticks / 60);' Line Number: 22
User prompt
Please fix the bug: 'TypeError: LK.getTicks is not a function' in or related to this line: 'self.setText(LK.getTicks() / 60);' Line Number: 22
User prompt
You can make a counter of the seconds survived in the corner
User prompt
can you make the enemy3 to have half the speed of a normal enemy
User prompt
You can make 1 in 50 enemies have a chance to follow the ship and have the texture of the Enemy3 asset
User prompt
You can make 1 in 10 meteorites have a chance to be 2 times faster than normal and have the texture of the Enemy2 asset
User prompt
when the original enemy and the other enemy exit the map they must duplicate to 4 then to 8 and so on
User prompt
the duplicated enemies must make the player lose when they collide with him too
User prompt
the duplicated enemy asset must go down too
User prompt
make the enemy asset duplicate when it exits the map
User prompt
make the enemy asset appear in a random position when it exits the map
User prompt
make the Enemy asset appear more up
User prompt
make it so that if the Enemy asset and the Ship asset collide the game ends
User prompt
Make the Enemy asset move in a straight line down until it exits the map
User prompt
put the Enemy asset in the game
/**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ game.update = function () { // Move the enemy asset down enemy.y += 5; // If the enemy asset exits the map, reset its position and create a duplicate if (enemy.y > 2732) { enemy.y = 0; enemy.x = Math.random() * 2048; // Random position between 0 and 2048 (game width) // Create a new instance of the enemy asset var enemy2 = game.addChild(LK.getAsset('enemy', { anchorX: 0.5, anchorY: 0.5, x: Math.random() * 2048, // Random position between 0 and 2048 (game width) y: 0 })); // Make the duplicated enemy asset move down too enemy2.update = function () { this.y += 5; }; } // Check for collision between the ship and the enemy if (ship.intersects(enemy)) { // End the game if the ship and the enemy collide LK.showGameOver(); } }; var ship = game.addChild(LK.getAsset('ship', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 })); // Add event listeners to move the ship with mouse clicks game.down = function (x, y, obj) { ship.x = x; ship.y = y; LK.getSound('ShipMove').play(); }; // Create a new instance of the enemy asset var enemy = game.addChild(LK.getAsset('enemy', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 500 }));
===================================================================
--- original.js
+++ change.js
@@ -22,8 +22,12 @@
x: Math.random() * 2048,
// Random position between 0 and 2048 (game width)
y: 0
}));
+ // Make the duplicated enemy asset move down too
+ enemy2.update = function () {
+ this.y += 5;
+ };
}
// Check for collision between the ship and the enemy
if (ship.intersects(enemy)) {
// End the game if the ship and the enemy collide
futuristic spaceship old nintendo game sprite. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
UFO sprite old nintendo game. 2d. No shadows
meteorite sprite old nintendo game. 2d. Blank background. High contrast. No shadows
Alien Mothership. 2d. Blank background. High contrast. No shadows