User prompt
бонус появляется каждую тысячу очков
User prompt
бонус действует 15 секунд
User prompt
враги появляются через 5 секунд после смерти
User prompt
враги возрождаются через 5 секунд после смерти
User prompt
Please fix the bug: 'TypeError: setTimeout is not a function' in or related to this line: 'setTimeout(function () {' Line Number: 365
User prompt
враги восстанавливаются через 5 секунд
User prompt
бонус дает машине возможность убивать врагов
User prompt
добавь бонус
User prompt
игрок может убить врага только когда съест бонус
User prompt
враги восстанавливаются через 5 секунд после смерти
User prompt
добавь бонус который дает игроку способность убивать врагов на 30 секунда
User prompt
сделай так чтобы assets enemy и enemy2 менялись каждую секунду
User prompt
сделай так чтобы assets enemy и enemy2 менялись каждую секунду
User prompt
сделай так чтобы assets enemy и enemy2 менялись каждую секунду
User prompt
car asset невеидимый
User prompt
сделай так чтобы assets car и car2 менялись каждую секунду
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in or related to this line: 'car.update();' Line Number: 212
User prompt
change assets car and car 2 every second
Code edit (1 edits merged)
Please save this source code
User prompt
сделай так чтобы машина меняла свой вид между car и car2
User prompt
сделай анимацию из car и car2
Code edit (1 edits merged)
Please save this source code
Initial prompt
Kostya's dinner
/****
* Classes
****/
//<Assets used in the game will automatically appear here>
// Define the Hero class
var Hero = Container.expand(function () {
var self = Container.call(this);
var heroGraphics = self.attachAsset('hero', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 10;
self.update = function () {
// Hero update logic
};
self.move = function (x, y) {
self.x = x;
self.y = y;
};
});
// Define the Obstacle class
var Obstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleGraphics = self.attachAsset('obstacle', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 5;
self.update = function () {
self.y += self.speed;
if (self.y > 2732) {
self.destroy();
}
};
});
// Define the Poop class
var Poop = Container.expand(function () {
var self = Container.call(this);
var poopGraphics = self.attachAsset('poop', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 5;
self.update = function () {
self.y += self.speed;
if (self.y > 2732) {
self.destroy();
}
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000 //Init game with black background
});
/****
* Game Code
****/
var hero = new Hero();
hero.x = 2048 / 2;
hero.y = 2732 - 200;
game.addChild(hero);
var poops = [];
var obstacles = [];
var score = 0;
var scoreTxt = new Text2('0', {
size: 150,
fill: "#ffffff"
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
function spawnPoop() {
var poop = new Poop();
poop.x = Math.random() * 2048;
poop.y = -50;
poops.push(poop);
game.addChild(poop);
}
function spawnObstacle() {
var obstacle = new Obstacle();
obstacle.x = Math.random() * 2048;
obstacle.y = -50;
obstacles.push(obstacle);
game.addChild(obstacle);
}
game.down = function (x, y, obj) {
hero.move(x, y);
};
game.move = function (x, y, obj) {
hero.move(x, y);
};
game.update = function () {
for (var i = poops.length - 1; i >= 0; i--) {
poops[i].update();
if (hero.intersects(poops[i])) {
score += 1;
scoreTxt.setText(score);
poops[i].destroy();
poops.splice(i, 1);
}
}
for (var j = obstacles.length - 1; j >= 0; j--) {
obstacles[j].update();
if (hero.intersects(obstacles[j])) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
}
if (LK.ticks % 60 == 0) {
spawnPoop();
}
if (LK.ticks % 120 == 0) {
spawnObstacle();
}
};
poop heart. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
red color
poop. 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.
magic poop. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.