Code edit (2 edits merged)
Please save this source code
User prompt
Update score every 2 second
Code edit (6 edits merged)
Please save this source code
User prompt
add a background фон below the background небо
User prompt
add background небо
Code edit (1 edits merged)
Please save this source code
User prompt
add background фон
User prompt
add background фон
User prompt
when you die, the glasses in the upper right corner of the screen are not displayed
User prompt
when you die, the glasses in the upper right corner of the screen are not displayed
User prompt
When you die, the glasses in the upper right corner of the screen are displayed
Code edit (1 edits merged)
Please save this source code
User prompt
show the points scored after death in the center of the screen
User prompt
obstacles rotate counterclockwise
User prompt
Add background "sky and sea"
User prompt
the obstacle rotates counterclockwise
Code edit (2 edits merged)
Please save this source code
User prompt
При смерте, указывать количество очков в центре экрана
Code edit (2 edits merged)
Please save this source code
User prompt
в правом верхнем углу добавить счетчик баллов, который каждую секунду увеличивает счет на 1, начинается с 0
Code edit (13 edits merged)
Please save this source code
User prompt
new obstacles appear every second
User prompt
Add an obstacle to the right side of the screen
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -39,9 +39,9 @@
self.move = function () {
// Obstacle moves from right to left
self.x += self.speedX;
// Rotate obstacle counterclockwise
- self.rotation -= 0.08;
+ self.rotation -= 0.10;
};
});
/****
@@ -53,21 +53,14 @@
/****
* Game Code
****/
-// Add sky background to the game
-var sky = game.addChild(LK.getAsset('sky', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: 1366 / 2
-}));
-// Add a new background below the sky
+// Add background to the game
var background = game.addChild(LK.getAsset('background', {
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2,
- y: 1366 + 3410 / 4
+ y: 2048 / 2
}));
var bird = game.addChild(new Bird());
bird.x = 350; // Start in the middle of the screen horizontally
bird.y = 1366; // Start in the middle of the screen vertically
@@ -130,9 +123,9 @@
fill: "#0000FF"
});
scoreTxt.anchor.set(1, 0); // Anchor to the top right corner
LK.gui.topRight.addChild(scoreTxt);
-// Update score every second
+// Update score every 2 seconds
LK.setInterval(function () {
score++;
scoreTxt.setText(score.toString());
-}, 1000);
\ No newline at end of file
+}, 2000);
\ No newline at end of file
голубое небо, горизонт и зеленое поле. 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.
button leaderboards. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.