===================================================================
--- original.js
+++ change.js
@@ -39,8 +39,16 @@
/****
* Game Code
****/
+// Add a background image
+// Initialize background
+var background = game.addChild(LK.getAsset('background', {
+ anchorX: 0.0,
+ anchorY: 0.0,
+ x: 0,
+ y: 0
+}));
// Initialize player
var player = game.addChild(new Player());
player.x = 2048 / 2;
player.y = 2732 - 200;
@@ -64,9 +72,8 @@
// Update missiles
for (var i = missiles.length - 1; i >= 0; i--) {
if (missiles[i].intersects(player)) {
LK.effects.flashScreen(0xff0000, 1000);
- LK.getSound('bgm').play();
LK.showGameOver();
}
if (missiles[i].y > 2732) {
missiles[i].destroy();
一颗陨石. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
一个宇航员,卡通风格. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
一个太空星空背景,唯美,浪漫. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
一颗陨石,卡通风格. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
一个金币,卡通. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.