User prompt
Decrease the interval for prepRandomTimer every 10 seconds by 0.2 seconds
User prompt
Каждые 10 секунд, время появления у prepf и peep уменьшается на 0.1 секунду
Code edit (2 edits merged)
Please save this source code
User prompt
Добавить усложнение с prepimages и prepfimages
Code edit (9 edits merged)
Please save this source code
User prompt
Добавить prepf3 по аналогии с prepf2
Code edit (1 edits merged)
Please save this source code
User prompt
Определить начальное положение prepf1 и prepf2 в те положения где и были, а не в положение prepimages
User prompt
Исправить ошибку, после последнего изменения изображения prepf1 и prepf2 стали появляться на месте prepimages
User prompt
Prepimages, prepf1 и prepf2 создаются не по времени, а рандомно одно из изображений раз в 5 секунду
User prompt
Если prepf1 и prepf2 ближе друг к другу чем на радиус 600, то prepf1 не создается
User prompt
Исправить ошибку, когда расстояние от prepimages и prepf2 меньше 600
User prompt
Если prepimages и prepf2 ближе друг к другу чем на радиус 600, то prepimages не создается
User prompt
Исправить ошибку, когда расстояние от prepimages и prepf2 меньше 500
User prompt
Если prepimages и prepf2 ближе чем на 500 друг к другу, то prepimages не создается
User prompt
Если prepf2 и prepimages ближе чем на 500 друг к другу, то prepf2 не создается
User prompt
Если prepf2 и prepimages ближе чем на 1000 друг к другу, то prepf2 не создается
User prompt
Если prepf2 и prepimages ближе чем на 600 пикселей друг к другу, то prepf2 не создается
Code edit (2 edits merged)
Please save this source code
User prompt
Prepf1 и prepf2 не могут пересекаться в радиусе изображений
Code edit (7 edits merged)
Please save this source code
User prompt
Сделай нарастающую сложность, но только с изображениями prepimages, prepf1 и prepf2
User prompt
Сделай нарастающую сложность для игры
Code edit (2 edits merged)
Please save this source code
User prompt
Prepimages создаются только в четные секунды, начиная с 2. А prepf1 и prepf2 создаются только в нечетные секунды, начиная с 3
===================================================================
--- original.js
+++ change.js
@@ -256,94 +256,20 @@
}));
image123.x = 2048 / 2; // Center image horizontally
image123.y = 2732 / 2 + 280; // Move image 123 down by 280 pixels
image123.rotation = Math.PI / 9; // Rotate image 123 by 20 degrees clockwise
-// Function to randomly display one of the Prep images every 2 seconds
-var prepImages = ['Prep1', 'Prep2', 'Prep3', 'Prep4', 'Prep5', 'Prep6'];
-var prepInterval = 3000; // Initial interval for Prep images
-var prepTimer = LK.setInterval(function () {
- if (Math.floor(LK.ticks / 60) % 2 === 0) {
- // Check if the current second is even
- var tooCloseToPrepF2 = false;
- game.children.forEach(function (child) {
- if (child.assetId === 'PrepF2' && Math.abs(child.x - (2048 + 100)) < 600 && Math.abs(child.y - (2732 / 2 + 430)) < 600) {
- tooCloseToPrepF2 = true;
- }
- });
- if (!tooCloseToPrepF2) {
- var randomIndex = Math.floor(Math.random() * prepImages.length);
- var prep = game.addChild(LK.getAsset(prepImages[randomIndex], {
- anchorX: 0.5,
- anchorY: 0.5
- }));
- prep.x = 2048 + 100; // Center image horizontally
- prep.y = 2732 / 2 + 430; // Center image vertically
- prep.rotation = Math.PI / 9;
- }
- }
- // Decrease interval to increase difficulty
- if (prepInterval > 1000) {
- prepInterval -= 100; // Decrease interval by 100ms
- LK.clearInterval(prepTimer);
- prepTimer = LK.setInterval(arguments.callee, prepInterval);
- }
-}, prepInterval);
-// Add image 'PrepF1' to the center of the screen every 3 seconds
-var prepF1Interval = 3000; // Initial interval for PrepF1 images
-var prepF1Timer = LK.setInterval(function () {
- if (Math.floor(LK.ticks / 60) % 2 === 1) {
- // Check if the current second is odd
- var tooCloseToPrepF2 = false;
- game.children.forEach(function (child) {
- if (child.assetId === 'PrepF2' && Math.abs(child.x - (2048 + 90)) < 600 && Math.abs(child.y - (2732 / 2 - 5)) < 600) {
- tooCloseToPrepF2 = true;
- }
- });
- if (!tooCloseToPrepF2) {
- var prepF1 = game.addChild(LK.getAsset('PrepF1', {
- anchorX: 0.5,
- anchorY: 0.5
- }));
- prepF1.x = 2048 + 90; // Center image horizontally
- prepF1.y = 2732 / 2 - 5; // Center image vertically
- prepF1.rotation = Math.PI / 9;
- }
- }
- // Decrease interval to increase difficulty
- if (prepF1Interval > 1000) {
- prepF1Interval -= 100; // Decrease interval by 100ms
- LK.clearInterval(prepF1Timer);
- prepF1Timer = LK.setInterval(arguments.callee, prepF1Interval);
- }
-}, prepF1Interval);
-// Add image 'PrepF2' to the center of the screen every 3 seconds
-var prepF2Interval = 7000; // Initial interval for PrepF2 images
-var prepF2Timer = LK.setInterval(function () {
- if (Math.floor(LK.ticks / 60) % 2 === 1) {
- // Check if the current second is odd
- var tooClose = false;
- game.children.forEach(function (child) {
- if (prepImages.includes(child.assetId) && Math.abs(child.x - (2048 + 210)) < 500 && Math.abs(child.y - (2732 / 2 + 140)) < 500) {
- tooClose = true;
- }
- });
- if (!tooClose) {
- var prepF2 = game.addChild(LK.getAsset('PrepF2', {
- anchorX: 0.5,
- anchorY: 0.5
- }));
- prepF2.x = 2048 + 210; // Center image horizontally
- prepF2.y = 2732 / 2 + 140; // Center image vertically
- prepF2.rotation = Math.PI / 9;
- }
- }
- // Decrease interval to increase difficulty
- if (prepF2Interval > 2000) {
- prepF2Interval -= 100; // Decrease interval by 100ms
- LK.clearInterval(prepF2Timer);
- prepF2Timer = LK.setInterval(arguments.callee, prepF2Interval);
- }
-}, prepF2Interval);
+// Function to randomly display one of the Prep images, PrepF1, or PrepF2 every 5 seconds
+var allPrepImages = ['Prep1', 'Prep2', 'Prep3', 'Prep4', 'Prep5', 'Prep6', 'PrepF1', 'PrepF2'];
+var prepRandomTimer = LK.setInterval(function () {
+ var randomIndex = Math.floor(Math.random() * allPrepImages.length);
+ var prep = game.addChild(LK.getAsset(allPrepImages[randomIndex], {
+ anchorX: 0.5,
+ anchorY: 0.5
+ }));
+ prep.x = 2048 + 100; // Center image horizontally
+ prep.y = 2732 / 2 + 430; // Center image vertically
+ prep.rotation = Math.PI / 9;
+}, 5000);
// Add 'Dom' image to the center of the screen
var domImage = game.addChild(LK.getAsset('Dom', {
anchorX: 0.5,
anchorY: 0.5
создать мультяшного сидячего персонажа. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
snowball. 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
Ufo (летающая тарелка). Мультяшная. 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
Дирижабль, мультяшный. 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
text: New Record! Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows