User prompt
Add another one time flash when isFalling and isOnGround
Code edit (1 edits merged)
Please save this source code
User prompt
Reduce jump speed as global speed increases
Code edit (3 edits merged)
Please save this source code
User prompt
Increase global speed after each obstacle passed
User prompt
Use that global variable For obstacles
User prompt
Use that global variable
User prompt
Add a new global variable to control both tracks and obstacles speed
User prompt
Call LK.effects.flashScreen(0xff0000, 500); // Flash screen red for half a second only once
Code edit (9 edits merged)
Please save this source code
User prompt
Also stop obstacles
User prompt
When athlete is falling and is on ground, stop tracks and obstacles movement
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
add a isFalling property to the athlete and update it
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: track is not defined' in or related to this line: 'track.update();' Line Number: 403
User prompt
call track update in gamePlaying
User prompt
use the track class in gameInitialize
User prompt
add a track class
User prompt
Please fix the bug: 'TypeError: undefined is not an object (evaluating 'track.x = trackPosition')' in or related to this line: 'track.x = trackPosition;' Line Number: 380
User prompt
Please fix the bug: 'ReferenceError: track is not defined' in or related to this line: 'track.x = trackPosition;' Line Number: 379
User prompt
make the tracks indefinetly scroll horizontally at the same speed as obstacles
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -406,11 +406,16 @@
newObstacle.y = groundLevel + 200;
obstacles.push(newObstacle);
game.addChild(newObstacle);
}
- if (!athlete.isFalling || !athlete.isOnGround) {
+ if (!athlete.isFalling && athlete.isOnGround) {
track.update();
track2.update();
+ } else {
+ // Stop obstacles movement when athlete is falling and on ground
+ obstacles.forEach(function (obstacle) {
+ obstacle.speedX = 0;
+ });
}
game.addChild(athlete);
// Check for collisions
obstacles.forEach(function (obstacle) {
Elongated elipse with black top half and white bottom half.
full close and front view of empty stands. retro gaming style
delete
delete
Basquettes à ressort futuriste. vue de profile. Retro gaming style
a blue iron man style armor flying. Retro gaming style
a blue iron man style armor flying horizontally. Retro gaming style
round button with a big "up" arrow icon and a small line under it. UI
A big black horizontal arrow pointing left with centred text 'YOU' in capital letters, painted on an orange floor.. horizontal and pointing left
remove
gold athletics medal with ribbon. retro gaming style
a black oval with a crying smiley face.