User prompt
make red flash longer when killed
Code edit (1 edits merged)
Please save this source code
User prompt
also play killed_1 after accident_1
User prompt
play accident_1 when killed
User prompt
when setting killer[2] active, play ambulance_1
User prompt
when setting killer[1] active, play police_1
User prompt
when setting killer[0] active, play car_1
Code edit (4 edits merged)
Please save this source code
User prompt
play levelWin_1 when wining a level
User prompt
add a function playHit() thay randmoly plays hit_1, hit_2 or hit_3
User prompt
play hit_1 when hitting an obstacle
User prompt
stop bgMusic when player is killed
User prompt
play coin_1 when player collects a coin
User prompt
play bgMusic repeatedly after start button press
User prompt
Please fix the bug: 'ReferenceError: currentTime is not defined' in or related to this line: 'self.lastKillerUpdate = currentTime;' Line Number: 425
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'resetKillers')' in or related to this line: 'killerManager.resetKillers();' Line Number: 1452
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'resetKillers')' in or related to this line: 'killerManager.resetKillers();' Line Number: 1451
Code edit (1 edits merged)
Please save this source code
User prompt
create a KillerManager class to organize killers to activate killers[0] after killerDelay, then killers[1] after killerDelay, then killers[2] after killerDelay, then killers[0] after killerDelay, ....
User prompt
organize killers to activate killers[0] after killerDelay, then killers[1] after killerDelay, then killers[2] after killerDelay, then killers[0] after killerDelay, ....
User prompt
create 3 different killers instead of 1
User prompt
add an index to Killer constructor that allow asset selection
User prompt
create a global array for killers
Code edit (3 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -477,9 +477,9 @@
}
// coinsCollected increment moved to updateScore function
var currentTime = Date.now();
if (currentTime - lastObstacleHitTime > immunityDelay && player && !player.isJumping && self.y > 2500 && self.y < 2732 && player.shadow.intersects(self)) {
- LK.getSound('hit_1').play();
+ playHit();
lastObstacleHitTime = currentTime; // Update the last hit time
// Make player flash red for 1 second
LK.effects.flashObject(player, 0xff0000, 1000);
// Add coin animation only if score is greater than 0
@@ -1509,5 +1509,10 @@
isPlaying = false;
}
gameInitialize();
// DEVLOG:
-// Make 3 killers and alternate between them
\ No newline at end of file
+// Make 3 killers and alternate between them
+function playHit() {
+ var hitSounds = ['hit_1', 'hit_2', 'hit_3'];
+ var randomIndex = Math.floor(Math.random() * hitSounds.length);
+ LK.getSound(hitSounds[randomIndex]).play();
+}
\ 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