Code edit (4 edits merged)
Please save this source code
User prompt
с 0 секунды по 10 секунду Frames until next enemy spawns = 230 с 10й секунды по 20 секунду Frames until next enemy spawns = 190 С 20й секунды по 30 секунду Frames until next enemy spawns = 150 С 30й секунды по 40 секунду Frames until next enemy spawns = 120 С 50й секунды и далее Frames until next enemy spawns = 100
Code edit (3 edits merged)
Please save this source code
User prompt
первые 10 секунд противники появляются с размером 200, следующие 10 секунд противник появляются с размером 170
Code edit (6 edits merged)
Please save this source code
User prompt
если 5 раз нажать на картинку napr в течение 2х секунд, то в центре экрана появляется картинка на 3 секунды
Code edit (2 edits merged)
Please save this source code
User prompt
если после того, как пуля попала в противника, а хвост невидимый, то счетчик 5 секунд обновляется
Code edit (1 edits merged)
Please save this source code
User prompt
XVOST пропадает через 1 секунду, как пуля попала в противника
User prompt
как только пуля попадает в противника, через секунду хвост исчезает и появляется через 2 секунды
User prompt
XVOST пропадает, если противник пересек границу y = 2299
User prompt
если противник пересек радиус y=2300, то XVOST исчезает на 2 секунды
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
добавить рандом в случайном появлении хвоста по X от 200 до 1800
User prompt
убрать рандом в скорости движения XVOST
Code edit (2 edits merged)
Please save this source code
User prompt
движение XVOST всегда начинается справа на лево
Code edit (4 edits merged)
Please save this source code
User prompt
при пересечении XVOST границ, он отображается зеркально
Code edit (2 edits merged)
Please save this source code
User prompt
при столкновении, XVOST начинает отображаться зеркально
Code edit (5 edits merged)
Please save this source code
User prompt
вращение хвоста происходит не от центра картинки, а от нижней ее части
===================================================================
--- original.js
+++ change.js
@@ -161,17 +161,44 @@
anchorY: 0.5
});
weapon.x = 1024; // Center horizontally
weapon.y = 2632; // Bottom of the screen
-// Add 'Napr' image to the center of the screen
+// Add 'Napr' image to the center of the screen and handle tap logic
+var naprTapCount = 0;
+var naprLastTapTime = 0;
var napr = game.addChild(new Container());
var naprGraphics = napr.attachAsset('Napr', {
anchorX: 0.5,
anchorY: 0.5
});
napr.x = 1700; // Center horizontally
napr.y = 2150; // Center vertically
napr.rotation = 7 * (Math.PI / 180); // Rotate the image by 10 degrees
+napr.down = function (x, y, obj) {
+ var currentTime = LK.ticks;
+ if (currentTime - naprLastTapTime <= 120) {
+ // 2 seconds at 60FPS
+ naprTapCount++;
+ if (naprTapCount >= 5) {
+ // Show central image for 3 seconds
+ var centralImage = game.addChild(new Container());
+ var centralImageGraphics = centralImage.attachAsset('picture', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ centralImage.x = 1024; // Center horizontally
+ centralImage.y = 1366; // Center vertically
+ LK.setTimeout(function () {
+ centralImage.visible = false;
+ centralImage.destroy();
+ }, 3000);
+ naprTapCount = 0; // Reset tap count
+ }
+ } else {
+ naprTapCount = 1; // Reset tap count if more than 2 seconds pass
+ }
+ naprLastTapTime = currentTime;
+};
// Add 'Tap' image to the center of the screen
var tap = game.addChild(new Container());
var tapGraphics = tap.attachAsset('Tap', {
anchorX: 0.5,
@@ -252,9 +279,9 @@
// Remove the dog after 2 seconds
LK.setTimeout(function () {
dog.visible = false;
dog.destroy();
- }, 1000);
+ }, 700);
}, 800);
}
enemies[j].destroy();
enemies.splice(j, 1);
@@ -273,9 +300,9 @@
playerBullets.splice(b, 1);
enemy.hit = true;
LK.setTimeout(function () {
xvost.visible = false; // Hide XVOST 1 second after collision
- }, 1000);
+ }, 1200);
if (!xvost.visible) {
LK.clearTimeout(xvostVisibilityTimer); // Clear existing timer if XVOST is currently invisible
}
xvostVisibilityTimer = LK.setTimeout(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.
вывеска на двух ниточках с надписью: TImakovDS. 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.