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
@@ -12,8 +12,9 @@
self.speedX = 5;
self.jumpSpeed = -17;
self.gravity = 0.5;
self.isOnGround = true;
+ self.isFalling = false; // Indicates if the athlete is currently falling
self.currentPosture = ""; // Store the name of the current posture
self.isChangingPosture = false; // 0 when idle or moving down, 1 when moving up
self.nextPosture = null;
self.tint = 0xc0d4FF;
@@ -238,11 +239,14 @@
self.move = function () {
self.x += self.speedX; // * 0; // TEMP DEBUG !!!
};
});
+/****************************************************************************************** */
+/************************************** TRACK CLASS ************************************ */
+/****************************************************************************************** */
var Track = Container.expand(function () {
var self = Container.call(this);
- self.speedX = -5; // Speed at which the track moves to simulate forward movement
+ self.speedX = -10; // Speed at which the track moves to simulate forward movement
// Attach track asset
self.trackAsset = self.attachAsset('track', {
anchorX: 0.0,
anchorY: 0.0
@@ -251,9 +255,9 @@
self.update = function () {
self.x += self.speedX;
// Reset position to create a continuous track effect
if (self.x <= -2048) {
- self.x = 0;
+ self.x = 2048;
}
};
});
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.