===================================================================
--- original.js
+++ change.js
@@ -10,12 +10,10 @@
anchorY: 0.5
});
self.speed = 5;
self.update = function () {
- self.y += self.speed;
- if (self.y > 2732) {
- self.destroy();
- }
+ // Create a floating effect by adjusting the player's y position using a sine wave
+ self.y += Math.sin(LK.ticks / 10) * 2;
};
});
// Define the Player class
var Player = Container.expand(function () {
一颗陨石. 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.