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
User prompt
Stop calling the run anim when falling
Code edit (1 edits merged)
Please save this source code
User prompt
Make a glow effect on the central rod
User prompt
Call the fall anim before gameover
Code edit (2 edits merged)
Please save this source code
User prompt
create a fall anim in athlete class
Code edit (12 edits merged)
Please save this source code
User prompt
add and show the background asset
User prompt
add an asset for the background
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: runAnim is not defined' in or related to this line: 'runAnim();' Line Number: 129
===================================================================
--- original.js
+++ change.js
@@ -250,12 +250,12 @@
/****
* Game Code
****/
-// Enumeration for game states
/****************************************************************************************** */
/************************************** GLOBAL VARIABLES ********************************** */
/****************************************************************************************** */
+// Enumeration for game states
var GAME_STATE = {
INIT: 'INIT',
MENU: 'MENU',
HELP: 'HELP',
@@ -369,10 +369,13 @@
game.addChild(athlete);
// Check for collisions
obstacles.forEach(function (obstacle) {
if (athlete.intersects(obstacle.centralRod)) {
- LK.effects.flashScreen(0xff0000, 500); // Flash screen red for half a second
- LK.showGameOver(); // Show game over screen
+ athlete.fallAnim(); // Call fall animation before game over
+ LK.setTimeout(function () {
+ LK.effects.flashScreen(0xff0000, 500); // Flash screen red for half a second
+ LK.showGameOver(); // Show game over screen
+ }, 500); // Delay game over to allow fall animation to be seen
}
});
}
/****************************************************************************************** */
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.