User prompt
The game end 1 score
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'intersects')' in or related to this line: 'if (bullets[j].intersects(animes[l])) {' Line Number: 154
User prompt
Add the animes in the game
User prompt
Game speed increase 5time
User prompt
Add a space theme in the background on the game
User prompt
Add a sound
User prompt
Add score board
Initial prompt
Ap
===================================================================
--- original.js
+++ change.js
@@ -52,14 +52,22 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x000000 //Init game with black background
+ backgroundColor: 0x000000 //Init game with black background
});
/****
* Game Code
****/
+// Add space background image
+var spaceBackground = LK.getAsset('spaceBackground', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2
+});
+game.addChild(spaceBackground);
// Initialize player
var player = game.addChild(new Player());
player.x = 2048 / 2;
player.y = 2732 - 200;