User prompt
a chimney can spawn after a touched it, or after it reaches the end of the screen
User prompt
make chimney spawns less frequent
User prompt
add a randomizer to the chimneyspawntimer
User prompt
new chimneys could spawn before the last one disappeared
User prompt
make chimney spawns more frequent
User prompt
chimneys spawn point should be at the right of the screen, not the middle
User prompt
the first 3 seconds of the game no chimneys should spawn, after that start spawning them at their spawn point
User prompt
the first 3 seconds of the game no chimneys should spawn, after that start spawning them at their spawn point
User prompt
the first 5 seconds of the game no chimneys should spawn
User prompt
all chimneys should spawn at y= 1765, even after a the next wave
User prompt
all chimneys should spawn at y= 1165, even after a the next wave
User prompt
chimneys cant spawn within 500 pixels of each other
User prompt
make the chimneys spawn less frequent
User prompt
all chimneys should spawn at y= 1365, even after a the next wave
Code edit (1 edits merged)
Please save this source code
User prompt
all chimneys should spawn at y= 1365
User prompt
all chimneys should spawn in the middle y coordinate of the screen
User prompt
make the chimneys move from right to left
Initial prompt
chimney hop
===================================================================
--- original.js
+++ change.js
@@ -25,18 +25,16 @@
var isGameOver = false;
var tickOffset = 0;
var giftThrowSpeed = -5;
var chimneySpeed = 2;
- var chimneySpawnTimer = Math.floor(Math.random() * (180 - 90 + 1)) + 90;
+ var chimneySpawnTimer = 90;
LK.on('tick', function () {
- if (chimneySpawnTimer > 0) {
- chimneySpawnTimer--;
- } else {
- var chimney = self.addChild(new Chimney());
- chimney.x = 2048;
- chimney.y = 1765;
- chimneys.push(chimney);
- chimneySpawnTimer = 150;
+ for (var i = chimneys.length - 1; i >= 0; i--) {
+ var chimney = chimneys[i];
+ if (chimney.x < 0 || gift.intersects(chimney)) {
+ chimney.x = 2048;
+ chimney.y = 1765;
+ }
}
});
stage.on('down', function (obj) {
var event = obj.event;
chimney. pixelart. residential chimney. only chimney. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift. pixelart. christmas. green and red. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
night sky. pixelart. seamless. clouds. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixelart. christmas. santa in sleigh. from the side. flying. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
grinch. green monster. pixelart. only face. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixelart. chistmas present. powerup. game art Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.