Code edit (5 edits merged)
Please save this source code
User prompt
add a new global function isActive() that returns isStarted && !isBonusStartAnim && !player.isDead
Code edit (2 edits merged)
Please save this source code
User prompt
Make detritus rotate on themselves when taken
Code edit (1 edits merged)
Please save this source code
User prompt
destroy binFadeInInterval after finished
Code edit (4 edits merged)
Please save this source code
User prompt
in addition to recycleBin.visible = true; recycleBinBack.visible = true; animate recycleBin and recycleBinBack alpha from 0 to 1 (don't use LK.effects.fadeObject that is not allowed)
User prompt
in addition to recycleBin.visible = true; recycleBinBack.visible = true; animate recycleBin and recycleBinBack alpha from 0 to 1
Code edit (2 edits merged)
Please save this source code
User prompt
when start button is pressed, set alpha of segments from 0 to 2 and the last 2 segments to 0. don't change any other logic
Code edit (2 edits merged)
Please save this source code
User prompt
when start button is pressed, fade out road segments from 0 to 2 and the last 2 segments. don't change any other logic
User prompt
when start button is pressed, fade out road segments from 0 to 5
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
when attaching a taken detritus to game with game.addChild(self);, add it so it comes behind recycleBin in term of z-index
Code edit (4 edits merged)
Please save this source code
User prompt
flash dertirus in green when taken
Code edit (1 edits merged)
Please save this source code
User prompt
accelerate the taken detritus move
User prompt
use velocity and acceleration for taken detritus move
User prompt
continue adapting the move : - make it globally sinusoidal - adapt it to make detritus reach the target (currently they fall before)
Code edit (3 edits merged)
Please save this source code
User prompt
its better, nom make the move more fluis and parabolic
===================================================================
--- original.js
+++ change.js
@@ -1181,8 +1181,10 @@
var SCORE_SEGMENT_DISTANCE = 1;
var SCORE_SEGMENT_POINTS = 100;
var SCORE_STOPPED_FACTOR = -0.2;
var SCORE_MAX_POINTS = SCORE_SEGMENT_POINTS * PLAYER_SPEED_FACTOR_MAX;
+// Bonus Constants
+var BONUS_COLLECT_TRESHOLD = 10;
//==============================================================================
// Game Instances & Variables
//==============================================================================
;
@@ -1192,8 +1194,9 @@
var gameOver = false;
var distanceRemaining = SCORE_TOTAL_DISTANCE;
var distanceRun = 0;
var kgCollected = 0;
+var nbCollectedBeforeBonus = 0; // Number of detritus collected since last bonus
;
var startY = 0; // Variable to store the initial Y position for swipe detection
var swipeStarted = false; // Flag to start detecting swipe only after tap
// Instances
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.