User prompt
Добавить звук chainsaw после пересечения игрока и противника
User prompt
Добавить звук jump после нажатия на экран
User prompt
Migrate to the latest version of LK
Code edit (1 edits merged)
Please save this source code
User prompt
сохранять очки, которые игрок заработал и отображать в overlay
User prompt
удалить gameOverScoreTxt
User prompt
исправить ошибку, когда таймер не идет
User prompt
добавить количество набранных очков в overlay
User prompt
удалить счетчик очков в центре экрана
User prompt
after 60 point Create a new obstacle every 18 ticks
User prompt
after 15 point Create a new obstacle every 18 ticks
Code edit (5 edits merged)
Please save this source code
User prompt
При пересечении птицы и облака, на первом плане птица
User prompt
картинка облака не перекрывает картинку птицы
User prompt
облако не перекрывает птицу
User prompt
птица поверх облака
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -112,17 +112,8 @@
if (distance < bird.width / 2 + obstacle.width / 2) {
// Flash screen red for 1 second (1000ms) to show game over.
LK.effects.flashScreen(0xff0000, 1000);
// Show game over. The game will be automatically paused while game over is showing.
- // Display the final score at the center of the screen
- var gameOverScoreTxt = new Text2(score.toString(), {
- size: 200,
- fill: "#FFFFFF"
- });
- gameOverScoreTxt.anchor.set(0.5, 0.5); // Anchor to the center
- gameOverScoreTxt.x = 2048 / 2; // Position at the center of the screen horizontally
- gameOverScoreTxt.y = 2732 / 4; // Position at the center of the screen vertically
- game.addChild(gameOverScoreTxt);
LK.showGameOver();
}
}
// Check if bird has fallen off the screen or risen above the screen
@@ -132,17 +123,8 @@
if (distance > 3000 / 2) {
// Flash screen red for 1 second (1000ms) to show game over.
LK.effects.flashScreen(0xff0000, 1000);
// Show game over. The game will be automatically paused while game over is showing.
- // Display the final score at the center of the screen
- var gameOverScoreTxt = new Text2(score.toString(), {
- size: 200,
- fill: "#FFFFFF"
- });
- gameOverScoreTxt.anchor.set(0.5, 0.5); // Anchor to the center
- gameOverScoreTxt.x = 2048 / 2; // Position at the center of the screen horizontally
- gameOverScoreTxt.y = 2732 / 4; // Position at the center of the screen vertically
- game.addChild(gameOverScoreTxt);
LK.showGameOver();
}
});
// Initialize bird and obstacles
@@ -158,9 +140,9 @@
fill: "#FFFFFF"
});
scoreTxt.anchor.set(1, 0); // Anchor to the top right corner
LK.gui.topRight.addChild(scoreTxt);
-// Update score every time it changes
-LK.on('tick', function () {
+// Update score every 2 seconds
+LK.setInterval(function () {
score++;
scoreTxt.setText(score.toString());
-});
\ No newline at end of file
+}, 1300);
\ 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.