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
User prompt
replace this code ``` for (var i = 0; i < road.segments.length; i++) { var segment = road.segments[i]; for (var j = 0; j < segment.background.children.length; j++) { var child = segment.background.children[j]; log("child[".concat(i, "][").concat(j, "]"), child); if (child.taken) { log("IS TAKEN : ", child); child.children[0].alpha = 0; } } } ```` to search for taken property in game children because when taken objects are deteched from road to game
Code edit (2 edits merged)
Please save this source code
User prompt
fix : ``` for (var i = 0; i < roadContainer.children.length; i++) { var child = roadContainer.children[i]; if (child.taken) { child.alpha = 0; } } ``` becaus detritus are attached to background property of roadsegment that are in road.segments array
Code edit (1 edits merged)
Please save this source code
User prompt
in startBonusAnimation, set alpha of all taken detritus to 0
Code edit (4 edits merged)
Please save this source code
User prompt
in startBonusAnimation, play bonus start sound and create a bonus asset at the recycleBin position
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
in Starfield add a property 'direction' to star, then use it to make star alpha change from 0 to 1 and vice versa
User prompt
update this : self.update = function () { for (var i = 0; i < self.children.length; i++) { var star = self.children[i]; if (Math.random() < 0.01) { // 1% chance to animate each star per frame star.alpha = 0.5 + 0.5 * Math.sin(LK.ticks / 30 + i); // Animate alpha from 0.5 to 1.0 } } }; to use this algotithm: Every 3 sec, select 10 stars randomly, then for this selected stars animate alpha from 0 to 1 and vice versa
Code edit (10 edits merged)
Please save this source code
User prompt
in starfield, animate alpha of random stars
User prompt
animate star field by animating alpha of random stars
Code edit (1 edits merged)
Please save this source code
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
===================================================================
--- original.js
+++ change.js
@@ -1182,9 +1182,9 @@
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;
+var BONUS_COLLECT_THRESHOLD = 10;
//==============================================================================
// Game Instances & Variables
//==============================================================================
;
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.