===================================================================
--- original.js
+++ change.js
@@ -39,16 +39,15 @@
/****
* 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
-}));
+// Attach the background image to the game
+var background = game.attachAsset('background', {
+ anchorX: 0.5,
+ anchorY: 0.5
+});
+background.x = 2048 / 2;
+background.y = 2732 / 2;
// Initialize player
var player = game.addChild(new Player());
player.x = 2048 / 2;
player.y = 2732 - 200;
一颗陨石. 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.