===================================================================
--- original.js
+++ change.js
@@ -43,8 +43,20 @@
scaleY: 1,
rotation: 0.125,
tint: 0x000000
});
+ // Shadow asset for the athlete
+ self.shadow = self.trunk.attachAsset('shadow', {
+ anchorX: 0.5,
+ anchorY: 1.0,
+ width: self.shadowBaseWidth,
+ height: self.shadowBaseHeight,
+ x: 0,
+ y: 300,
+ tint: 0x000000,
+ alpha: 0.5,
+ visible: false
+ });
self.head = self.trunk.attachAsset(self.faceAsset, {
anchorX: 0.5,
anchorY: 2,
scaleX: 1,
@@ -81,20 +93,8 @@
scaleY: 1.0,
tint: self.tint
});
// Left foot asset attachment removed
- // Shadow asset for the athlete
- self.shadow = self.trunk.attachAsset('shadow', {
- anchorX: 0.5,
- anchorY: 1.0,
- width: self.shadowBaseWidth,
- height: self.shadowBaseHeight,
- x: 0,
- y: 300,
- tint: 0x000000,
- alpha: 0.5,
- visible: false
- });
// FUNCTIONS
self.updatePosture = function (force) {
var speed = force ? 1 : 0.2; // Speed of transition
if (!self.targetPosture) {
@@ -661,9 +661,9 @@
case 3:
newMessage = "Level 3: Pros\r\n \r\n \r\n";
break;
case 4:
- newMessage = "Level 4: Super Heroes\r\n \r\n \r\n ";
+ newMessage = "Final: Super Heroes\r\n \r\n \r\n ";
break;
default:
newMessage = "Level 1: Juniors\r\n \r\n \r\n ";
break;
@@ -742,9 +742,10 @@
/****************************************************************************************** */
var Confetti = Container.expand(function (isFinal) {
var self = Container.call(this);
self.particles = [];
- self.particleCount = isFinal ? 30 : 100;
+ self.particleCount = 100;
+ self.medalCount = 20;
self.getParticle = function (isMedal) {
if (isMedal) {
return self.attachAsset('medal', {
anchorX: 0.5,
@@ -768,10 +769,15 @@
});
};
self.spawConfettis = function (isFinal) {
for (var i = 0; i < self.particleCount; i++) {
- self.particles.push(self.getParticle(isFinal));
+ self.particles.push(self.getParticle());
}
+ if (isFinal) {
+ for (var i = 0; i < self.medalCount; i++) {
+ self.particles.push(self.getParticle(true));
+ }
+ }
};
self._update_migrated = function () {
self.particles.forEach(function (particle) {
particle.y += 10; // Speed of falling
@@ -1185,9 +1191,9 @@
var numberOfOpponents = 4; // Adjust based on the actual number of opponents in the game
var groundLevel = 2732 - 200; // Ground level set 200px from the bottom
var linesGroundLevels = []; // Ground level set 200px from the bottom for each line
var numberOfLines = 1 + numberOfOpponents;
-var numberOfObstacles = 2; //20; // Total number of hurdles
+var numberOfObstacles = 20; // Total number of hurdles
var obstacles = [[]];
var obstacleSpawnTicker = 0;
var obstacleSpawnDistanceRate = 1.5; // Ratio of screen width between obstacles
var obstacleJustPassed = false;
@@ -1240,9 +1246,9 @@
// Purple
0x008080 // Teal;
];
var currentRoundColors = [];
-var isDebug = true;
+var isDebug = false;
var debugMarker;
// UI
var hintMobileText;
var startText;
@@ -1331,10 +1337,10 @@
h: 200,
r: Math.PI * 2 * -0.05
},
shadow: {
- x: 140,
- y: 300,
+ x: 130,
+ y: 230,
h: 230,
r: 0
}
};
@@ -1673,9 +1679,9 @@
scoreTxt = new Text2("0/" + numberOfObstacles.toString(), {
size: 80,
fill: "#FFFFFF"
});
- scoreTxt.anchor.set(0.25, 0.125); // Center the score text horizontally
+ scoreTxt.anchor.set(0.5, 0.22); // Center the score text horizontally
LK.gui.top.addChild(scoreTxt); // Add the score text to the GUI overlay at the top center
currentFinishPosition = 1;
// Remove starting blocks offset
for (var i = numberOfOpponents - 1; i >= 0; i--) {
@@ -2033,8 +2039,9 @@
if (athlete.hasFlashed && !athlete.hasFlashedGround && athlete.isFalling && athlete.isOnGround) {
LK.effects.flashScreen(0xff0000, 500); // Flash screen red for half a second
athlete.hasFlashedGround = true;
globalSpeedPerLine[0] = 0;
+ speedGauge = 0;
LK.setTimeout(function () {
globalSpeedPerLine[0] = globalBaseSpeed * speedGauge;
athlete.restore();
}, 1000); // 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.