User prompt
even with value 200 `Math.abs(self.parent.x + self.x - player.x) < 200 && Math.abs(self.parent.y + self.y - player.y) < 200 ` doesn't work. find another way to detect proximity
Code edit (1 edits merged)
Please save this source code
User prompt
`isBonusActive && Math.abs(self.x - player.x) < 150 && Math.abs(self.y - player.y) < 150 ||` I think self.x is relative it should take into acount parents position
Code edit (4 edits merged)
Please save this source code
User prompt
`isBonusActive && self.x === player.x && self.y === player.y ` is too restrictive, the detristus have just to pass near the player to be taken
User prompt
consition in `if (!self.taken && (isBonusActive || player.body.torso.intersects(self)))` is not enough because when isBonusActive still the detritus must reach player position (angle/ node) on the road
User prompt
while bonus is active, make detritus reaching the player position automatically taken without need of intersect
Code edit (3 edits merged)
Please save this source code
User prompt
in startBonusAnimation, call stopBouns() after BONUS_DURATION_SEC seconds
Code edit (9 edits merged)
Please save this source code
User prompt
in startBonusAnimation, when setting isBonusActive active stop bgMusic and play bonusMusic
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
in Player.update(), add other flashy colors to animate player tint when bonus is active and make them change fast
Code edit (1 edits merged)
Please save this source code
User prompt
in Player.update(), animate player tint using tintPlayer() from white to green and vice versa
Code edit (14 edits merged)
Please save this source code
User prompt
in player class while isBonusActive, animate player tint using tintPlayer() from white to green and vice versa
Code edit (1 edits merged)
Please save this source code
User prompt
when bonus reaches 1st target then it moves toward the player while decreasing width and height to 10
Code edit (1 edits merged)
Please save this source code
User prompt
Animate bonus : move to road x,y while increasing width and height to 1024
Code edit (7 edits merged)
Please save this source code
User prompt
in startBonusAnimation add a green screen flash
User prompt
play startButon audio when start button pressed
===================================================================
--- original.js
+++ change.js
@@ -774,10 +774,12 @@
LK.getSound('lose').play();
callGameOver(true);
}
if (isBonusActive) {
- // Animate player tint using tintPlayer() from white to green and vice versa
- var tintColor = Math.sin(LK.ticks / 30) > 0 ? 0x00ff00 : 0xffffff;
+ // Animate player tint using multiple flashy colors
+ var colors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff00ff, 0x00ffff];
+ var colorIndex = Math.floor(LK.ticks / 5 % colors.length);
+ var tintColor = colors[colorIndex];
tintPlayer(tintColor);
}
}
function jumpStart() {
white
circle sliced into many pieces, flat image. 2d, white background, shadowless.
pixel art of a tall, tree. game asset, 2d, white background, shadowless.
pixel art cloud. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark space.
flying lava bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a bonus crystal ball with the recycle symbol. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
top view A green round start button empty in the center like a ring.