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
User prompt
in Detritus taken move, take into account startX and startY as start position to make the parabolic move
Code edit (1 edits merged)
Please save this source code
User prompt
the current Parabolic trajectory isn't parabolic, please make update like this: - from detritus x to Math.abs((target.x-x)/2 make them move up (reduce y) a bit - from detritus Math.abs((target.x-x)/2 to target.x make them move down (increase y to reach target.y) with acceleration
User prompt
make current move of taken detritus a parabolic trajectory (first move up then down)
User prompt
it doesn't work, currently detritus move to the top at high speed and never fall back to the recycle bin check if the signs are correct.
Code edit (10 edits merged)
Please save this source code
User prompt
now use advanced calculations in order to make the taken detritus move with natural physics from their position to the target (parabolic trajectory)
Code edit (5 edits merged)
Please save this source code
User prompt
stop bgMusic in callGameover
User prompt
when start button is pressed play bgMusic after 100ms
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
in StartButton, also animate recycle alpha from 1 to 0 and vice versa
Code edit (4 edits merged)
Please save this source code
User prompt
in StartButton, animate recycle rotation
===================================================================
--- original.js
+++ change.js
@@ -1192,16 +1192,8 @@
var sun = game.addChild(new Sun({
x: GAME_WIDTH / 2,
y: 50
}));
-var recycleBinBack = game.addChild(LK.getAsset('recycleBinBack', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 250,
- //450,
- y: 1750
-}));
-;
var playerContainer = game.addChild(new Container());
var roadContainer = game.addChild(new Container());
var road = roadContainer.addChild(new Road({
x: GAME_WIDTH / 2,
@@ -1247,8 +1239,16 @@
anchorY: 0.5,
size: 2 * TEXT_DEFAULT_SIZE
}));
;
+var recycleBinBack = game.addChild(LK.getAsset('recycleBinBack', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 250,
+ //450,
+ y: 1750
+}));
+;
var recycleBin = game.addChild(LK.getAsset('recycleBin', {
anchorX: 0.5,
anchorY: 0.5,
x: 250,
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.