User prompt
при нажатии на экран и свайпе влево, самолет поворачивается против часовой стрелки, при нажатии и свайпе вправо, по часовой стрелке
Code edit (3 edits merged)
Please save this source code
User prompt
опустить начальную точку появления самолета на 10 пикселей вниз
Code edit (5 edits merged)
Please save this source code
User prompt
при столкновении самолета и health_bar game over
Code edit (1 edits merged)
Please save this source code
User prompt
health_bar поверх background2
User prompt
добавить задний фон health_bar в верхней части экрана
User prompt
добавить health_bar в верхнюю часть экрана
Code edit (1 edits merged)
Please save this source code
User prompt
увеличить границу пола на 50
User prompt
исправить ошибку, когда самолет сразу же врезается в пол
Code edit (15 edits merged)
Please save this source code
User prompt
самолет появляется в левой нижней части экрана
User prompt
удалить Background1
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
добавить Background2
Code edit (5 edits merged)
Please save this source code
User prompt
переместить background1 над background
User prompt
добавить картинку background1 в верхней части экрана
User prompt
добавить задний фон1
User prompt
смерть при касании потолка и пола не по объекту, а по изображению
User prompt
удалить задний фон сверху
User prompt
задний фон добавить в нижнюю часть экрана
===================================================================
--- original.js
+++ change.js
@@ -71,17 +71,15 @@
/****
* Game Code
****/
-// Add background2 to the middle of the game
-var background2 = game.attachAsset('background2', {
+// Add health_bar to the top of the game
+var health_bar = game.attachAsset('health_bar', {
anchorX: 0.5,
- anchorY: 0.5,
- scaleX: 1,
- scaleY: 1
+ anchorY: 0
});
-background2.x = 2175 / 2;
-background2.y = 2610 / 2;
+health_bar.x = 2048 / 2;
+health_bar.y = 0;
// Add background to the bottom of the game
var background = game.attachAsset('background', {
anchorX: 0,
anchorY: 1,
@@ -93,9 +91,9 @@
var bullets = []; // Global array to keep track of bullets
// Create a plane
var plane1 = new Plane1();
plane1.x = 100;
-plane1.y = 2732 - plane1.height; // Bottom of the screen
+plane1.y = 2731 - plane1.height; // Bottom of the screen
game.addChild(plane1);
// Create a plane
// Set up game tick
LK.on('tick', 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.