Code edit (3 edits merged)
Please save this source code
User prompt
when isReturningToBase ,platformNext.x should not go below 2048-platformNext.width
User prompt
prevent stick to grow mare than 2048-stick.x-100
Code edit (1 edits merged)
Please save this source code
User prompt
revert platformMinWidth calculation : wider on first levelrs, thiner on high levels
User prompt
now add a ratio to make minimum width depend on the level (larger for first levels, then more and more thin)
User prompt
now add a ratio to make width depend on the level (larger for first levels, then more and more thin)
User prompt
use them handleNinjaReachPlatform
User prompt
create global variables for platformMinWidth and platformMaxWidth
Code edit (2 edits merged)
Please save this source code
User prompt
in game.update when isReturningToBase, ensure platformNext.x don't go below platformTarget.x+200
User prompt
make the ninjaappear behind the platforms
Code edit (4 edits merged)
Please save this source code
User prompt
make the stick appear behind the platforms
User prompt
make the stick appear behind the platforms
User prompt
when the stick fall end play stickTapSound
Code edit (1 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
User prompt
no, declare the variables in globale scope, and init the objects in gameinitialize
User prompt
move background and startbutton init in gameinitialize, kee the variables global
User prompt
call gameinitalize
User prompt
add a function named'gameInitialize()'
User prompt
Please fix the bug: 'InternalError: too much recursion' in or related to this line: 'gameInitialize();' Line Number: 105
User prompt
move all initialization code in a function named'gameInitialize()'
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -412,9 +412,9 @@
if (Math.abs(distanceToMove) <= moveSpeed) {
// If the distance to move is less than or equal to the move speed, snap to position
platformCurrent.x = basePlatformX;
platformTarget.x += distanceToMove;
- platformNext.x += distanceToMove;
+ //platformNext.x += distanceToMove;
ninja.x += distanceToMove;
stick.x += distanceToMove;
isReturningToBase = false; // Stop moving objects
} else {