Code edit (12 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: self.bonusIcon is null' in or related to this line: 'self.bonusIcon.destroy();' Line Number: 269
Code edit (4 edits merged)
Please save this source code
User prompt
play bonus_approaching when bonus manager activate a bonus
User prompt
play bonus_take when taking a bonus
Code edit (1 edits merged)
Please save this source code
User prompt
in BOnus update, make bonusHalo rotate sequencially
===================================================================
--- original.js
+++ change.js
@@ -144,9 +144,9 @@
var currentTime = Date.now();
var currentDelay = currentTime - self.lastBonusUpdate;
if (currentDelay >= self.bonusDelay) {
LK.getSound('bonus_approaching').play();
- self.currentBonusIndex = 0; // TEMP DEBUG (self.currentBonusIndex + 1) % self.bonuses.length;
+ self.currentBonusIndex = (self.currentBonusIndex + 1) % self.bonuses.length;
self.bonuses[self.currentBonusIndex].inactive = false;
self.lastBonusUpdate = currentTime;
}
};
@@ -158,13 +158,13 @@
self.lastBonusUpdate = Date.now();
};
self.updateForLevel = function (level) {
if (level === 1) {
- self.bonusDelay = 16000; // Delay in milliseconds for level 1
+ self.bonusDelay = 8000; // Delay in milliseconds for level 1
} else if (level === 2) {
self.bonusDelay = 12000; // Delay in milliseconds for level 2
} else if (level === 3) {
- self.bonusDelay = 9000; // Delay in milliseconds for level 3
+ self.bonusDelay = 16000; // Delay in milliseconds for level 3
}
};
self.applyBonus = function (index) {
self.currentActiveBonus = index + 1;
@@ -541,8 +541,9 @@
if (self.inactive) {
return;
}
if (!isKilled && player && self.y > 2500 && self.y < 2732 && player.shadow.intersects(self)) {
+ LK.getSound('accident_1').play();
if (bonusManager.currentActiveBonus == 1) {
// Have Helmet!
LK.effects.flashScreen(0xffffff, 2000);
self.reset();
@@ -551,9 +552,8 @@
}
isKilled = true;
player.visible = false;
LK.stopMusic();
- LK.getSound('accident_1').play();
LK.setTimeout(function () {
LK.getSound('killed_1').play();
}, 100); // Adjust the delay as needed
LK.setTimeout(function () {
@@ -577,9 +577,9 @@
killerGraphics.width = startSize + (endSize - startSize) * self.progress;
debugTxt.setText(self.progress.toFixed(2));
killerGraphics.height = assetHeightRatio * killerGraphics.width;
var tempSpeed = currentSpeed * 0.5 + currentSpeed * (self.progress * 3);
- var newSpeed = currentSpeed * 3;
+ var newSpeed = currentSpeed * 3 + (currentLevel - 1);
newSpeed = tempSpeed * 1;
self.y += newSpeed;
if (self.pathIndex == 0 && self.x != leftEndX) {
self.x = leftStartX + (leftEndX - leftStartX) * self.progress;
@@ -984,9 +984,11 @@
self.helmet.visible = bonusManager.currentActiveBonus == 1;
if (self.helmet.visible) {
self.helmet.scale.x *= -1;
self.helmet.x *= -1;
- self.helmet.y = currentLevel == 2 ? -190 : -210;
+ self.helmet.y = currentLevel == 2 ? -170 : -210;
+ self.helmet.scale.x = currentLevel == 3 ? 1.1 : 1;
+ self.helmet.scale.y = currentLevel == 3 ? 1.1 : 1;
}
}
}
};
@@ -1476,9 +1478,9 @@
name: "Level 1",
backgroundTint: 0xeda716,
coinValue: 0.10,
baseSpeed: 10,
- nextLevelScore: 1
+ nextLevelScore: 10
}, {
name: "Level 2",
backgroundTint: 0x2faf1d,
coinValue: 1,
@@ -1853,7 +1855,5 @@
debugTxt.visible = isDebug;
LK.gui.bottomRight.addChild(debugTxt);
isPlaying = false;
}
-gameInitialize();
-// DEVLOG:
-// Fix Conis behavious with Bonus 3 (magnet)
\ No newline at end of file
+gameInitialize();
\ No newline at end of file
Directly overhead, plumb view of a beggar heading top (we see his back).. Zenith view, directly overhead, plumb view. NOT PERSPECTIVE! Fantasy theme. Pixel art
a traffic cone. video game sprite
face view of a big start button in the shape of a dollar bill. video game style
a tree. video game style
a black garbage bag. video game style
Dollar bill. Perspective. video game sprite
perspective of a simple snake rolled up on itself.. video game sprite
Ball of dry desert bushes. video game sprite
tractor. high definition video game sprite
street ad billboard with 1 or 2 posts with "Get rich!" on it. high definition video game sprite
a dog sleeping on a street. video game sprite
desert bush. video game sprite
profile view of an empty motorcycle helmet. black with a white vertical central band and another thiner orange band on the center. NOT PERSPECTIVE!. Pixel art high definition
simple red and white magnet. video game style
gold sign with a "X" and a "2". video game style
bgMusic
Music
coin_1
Sound effect
hit_1
Sound effect
hit_2
Sound effect
hit_3
Sound effect
levelWin_1
Sound effect
car_1
Sound effect
police_1
Sound effect
ambulance_1
Sound effect
accident_1
Sound effect
killed_1
Sound effect
jump_1
Sound effect
rip_1
Sound effect
bonus_take
Sound effect
bonus_approaching
Sound effect