Code edit (1 edits merged)
Please save this source code
User prompt
Оптимизируй изображения в верху экрана
Code edit (1 edits merged)
Please save this source code
User prompt
Добавить звук loser при всех gameover
User prompt
Добавить звук win, после каждого очка
Code edit (1 edits merged)
Please save this source code
User prompt
Добавить красный флаг скрин при смерте
Code edit (7 edits merged)
Please save this source code
User prompt
Добавить mopkobka чуть правее левого центра top
Code edit (1 edits merged)
Please save this source code
User prompt
Опустить tap на 5 ниже
Code edit (2 edits merged)
Please save this source code
User prompt
Добавить tap левее strelka
Code edit (1 edits merged)
Please save this source code
User prompt
Добавить стрелка чуть прочее от shar
Code edit (1 edits merged)
Please save this source code
User prompt
Добавить shar левее центра картинки top
User prompt
Добавить shar в центр изображения top
/**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ var top = game.addChild(LK.getAsset('Top', { anchorX: 0.5, anchorY: 0, x: 2048 / 2, y: 0 })); var shar = game.addChild(LK.getAsset('Shar', { anchorX: 0.5, anchorY: 0.5, x: top.x - 120, y: top.y + top.height / 2 })); var strelka = game.addChild(LK.getAsset('Strelka', { anchorX: 0.5, anchorY: 0.5, x: shar.x + 150, y: shar.y })); var mopkobka = game.addChild(LK.getAsset('Mopkobka', { anchorX: 0.5, anchorY: 0.5, x: top.x - 350, y: top.y + top.height / 2 })); var tap = game.addChild(LK.getAsset('Tap', { anchorX: 0.5, anchorY: 0.5, x: strelka.x + 150, y: strelka.y + 5 })); var palka = game.addChild(LK.getAsset('Palka', { anchorX: 0.5, anchorY: 0.5, x: top.x + 320, y: top.y + top.height / 2 })); var scoreIcon = game.addChild(LK.getAsset('Scoreicon', { anchorX: 0.5, anchorY: 0, x: 2048 / 2 + 820, y: 35 })); var taimer = game.addChild(LK.getAsset('Taimer', { anchorX: 0, anchorY: 0, x: 1435, y: 30 })); var ball = game.addChild(LK.getAsset('ball', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 - 150 })); ball.update = function () { var dx = circle.x - ball.x; var dy = circle.y - ball.y; var distanceSquared = dx * dx + dy * dy; if (distanceSquared > 900) { var distance = Math.sqrt(distanceSquared); ball.x += dx / distance * 35; ball.y += dy / distance * 35; } else { oldCircle = circle; circle = generateCircle(); if (oldCircle) { LK.setTimeout(function () { if (oldCircle) { oldCircle.destroy(); oldCircle = null; } }, 100); } } }; function generateCircle() { var x = Math.random() * (2048 - 300) + 150; var y = Math.random() * (2732 - 300 - 205) + 150 + 205; scored = false; var newCircle = game.addChild(LK.getAsset('Circle', { anchorX: 0.5, anchorY: 0.5, x: x, y: y })); if (oldCircle && newCircle.intersects(oldCircle)) { newCircle.destroy(); return generateCircle(); } return newCircle; } var score = 0; var scored = false; var oldCircle = null; var circle = generateCircle(); var countdown = 2; var countdownTxt = new Text2('2', { size: 80, fill: "#000000" }); countdownTxt.anchor.set(0, 0); countdownTxt.y += 20; countdownTxt.x += 1100; LK.gui.topLeft.addChild(countdownTxt); var countdownTimer = LK.setInterval(function () { countdown--; countdownTxt.setText(countdown); if (countdown <= 0) { LK.clearInterval(countdownTimer); LK.showGameOver(score); } }, 1000); var scoreTxt = new Text2('0', { size: 80, fill: "#000000" }); scoreTxt.anchor.set(1, 0); scoreTxt.y += 20; LK.gui.topRight.addChild(scoreTxt); game.down = function (x, y, obj) { var dx = circle.x - ball.x; var dy = circle.y - ball.y; var distanceSquared = dx * dx + dy * dy; var dxOld = oldCircle ? oldCircle.x - ball.x : 0; var dyOld = oldCircle ? oldCircle.y - ball.y : 0; var distanceOldSquared = dxOld * dxOld + dyOld * dyOld; if (distanceSquared > 0 && distanceSquared <= 22500 || distanceOldSquared > 0 && distanceOldSquared <= 22500 && !scored) { score++; scored = true; scoreTxt.setText(score); countdown = 2; countdownTxt.setText(countdown); countdownTxt.style = { fill: "#000000" }; // Black LK.clearInterval(countdownTimer); countdownTimer = LK.setInterval(function () { countdown--; countdownTxt.setText(countdown); if (countdown <= 0) { LK.clearInterval(countdownTimer); if (!scored) { LK.setScore(score); LK.showGameOver(); } scored = false; } }, 1000); scored = false; } else { LK.setScore(score); LK.showGameOver(); } };
===================================================================
--- original.js
+++ change.js
@@ -28,9 +28,9 @@
}));
var mopkobka = game.addChild(LK.getAsset('Mopkobka', {
anchorX: 0.5,
anchorY: 0.5,
- x: top.x - 120,
+ x: top.x - 350,
y: top.y + top.height / 2
}));
var tap = game.addChild(LK.getAsset('Tap', {
anchorX: 0.5,
Песочные часы, черный. 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.
Carrot, черный цвет. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.