Code edit (10 edits merged)
Please save this source code
User prompt
only centralRod should be considered fo obstacle intersection
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
in obstacle class, add 2 other obstacleGraphics with asset 'obstacle'
Code edit (18 edits merged)
Please save this source code
User prompt
add 3 other obstacle assets in Obstacle class
Code edit (1 edits merged)
Please save this source code
User prompt
in jumpAnim when athlete.speedY is positive return legs to their inital rotation
Code edit (2 edits merged)
Please save this source code
User prompt
in jumpAnim, make the change from current legs rotation to athlete.rightLeg.rotation = -1.5; athlete.leftLeg.rotation = 1; progressive
Code edit (17 edits merged)
Please save this source code
User prompt
in jumpAnim, make the change to athlete.rightLeg.rotation = -1.5; athlete.leftLeg.rotation = 1; progressive
Code edit (1 edits merged)
Please save this source code
User prompt
in jumpAnim, do only one oscillation
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'isOnGround')' in or related to this line: 'if (self.isOnGround) {' Line Number: 298
Code edit (23 edits merged)
Please save this source code
User prompt
in gamePlaying, call jumpAnim instead of runAnim when user taps the sceen
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
make the switch between x position of left and right arms progressive
User prompt
add a switch between x position of left and right arms at the same rythm as the oscillation
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -330,10 +330,17 @@
athlete.rightArm.rotation = runningArmAngle;
athlete.leftArm.rotation = -runningArmAngle;
athlete.trunk.width = 30 - 10 * (runningArmAngle * Math.PI * 0.5); //armSwitchProgress; // + 10 * Math.abs(runningArmAngle);
var legRotationSpeed = 0.05; // Speed of rotation change
- athlete.rightLeg.rotation += (-1.5 - athlete.rightLeg.rotation) * legRotationSpeed;
- athlete.leftLeg.rotation += (1 - athlete.leftLeg.rotation) * legRotationSpeed;
+ if (athlete.speedY > 0) {
+ // Return legs to initial rotation when descending
+ athlete.rightLeg.rotation += (0 - athlete.rightLeg.rotation) * legRotationSpeed;
+ athlete.leftLeg.rotation += (0 - athlete.leftLeg.rotation) * legRotationSpeed;
+ } else {
+ // Continue with jump animation adjustments
+ athlete.rightLeg.rotation += (-1.5 - athlete.rightLeg.rotation) * legRotationSpeed;
+ athlete.leftLeg.rotation += (1 - athlete.leftLeg.rotation) * legRotationSpeed;
+ }
}
/****************************************************************************************** */
/************************************** MAIN GAME LOOP ************************************ */
/****************************************************************************************** */
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.