User prompt
Whenever ninja collects sheild, make ninja invincible for 10sec.
User prompt
Only play sound when sheild bubble hits the obstacles.
User prompt
Now whenever obstacle hits the Sheild Play distruction sound effect.
User prompt
change the flash color to little bit darker red.
User prompt
instead of flashing ninja when lives reduce shake ninja when life is reduced
User prompt
Please fix the bug: 'Timeout.tick error: LK.effects.shake is not a function' in or related to this line: 'LK.effects.shake(ninja, 10, 500, "ease-out");' Line Number: 235
Code edit (1 edits merged)
Please save this source code
User prompt
i want continuous 3 flashes not single. also the flash opacity high i want it to be around 0.3
User prompt
Whenever ninja life is reduced flash screen to red for 3sec, flash opacity should be below 0.3
User prompt
i want the tint effect to be inserted for each new dash not only one dash, you can check that code between line 169 to 189
User prompt
When ninja's life is reduce make a tint of every spawned dash to red for 3 secs. and after 3 sec back to normal tint.
User prompt
When ninja's life is reduce make a tint of dash to red for 3 secs. and after 3 sec back to normal tint.
User prompt
Make ninja invincible when sheild is enabled.
User prompt
whenever obstacles collide with the sheild bubble, it will destroy them.
User prompt
When ninja is not having a sheild, and hits the obstacle play ninja grunt sound effect.
User prompt
currently the red flash is on the single sprite and it get destroyed when the animation change to another sprite, i want the flash to stay for 3 sec, no matter sprite is destroyed.
User prompt
Now i want to make ninja to flash red for 3 sec after intersecting with obstacles, but if the ninja have a sheild collected and sheild time is not over ( 10 sec ).
===================================================================
--- original.js
+++ change.js
@@ -186,22 +186,14 @@
// Reduce the lives by one
self.lives--;
// Update the display
updateDisplayLives();
- // Flash screen red for 1 second, three times, to show life reduction.
- for (var i = 0; i < 3; i++) {
- LK.setTimeout(function () {
- LK.effects.flashObject(ninja, 0xff0000, 500);
- }, i * 1000);
- }
+ // Shake ninja to show life reduction.
+ LK.effects.shake(ninja, 10, 500, "ease-out");
// If no lives left, game over
if (self.lives === 0) {
- // Flash screen red for 1 second, three times, to show we are dead.
- for (var i = 0; i < 3; i++) {
- LK.setTimeout(function () {
- LK.effects.flashScreen(0xff0000, 1000, 0.3);
- }, i * 1000);
- }
+ // Shake ninja to show we are dead.
+ LK.effects.shake(ninja, 10, 500, "ease-out");
// Show game over. The game will be automatically paused while game over is showing.
LK.showGameOver(); // Calling this will destroy the 'Game' and reset entire game state.
}
// Make ninja invincible for 3 seconds if not already invincible
Ninja Star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A minimalist icon depicting a ninja head silhouette in black. The silhouette should be simple and recognizable, with a headband or mask detail. The background should be transparent or a contrasting color (e.g., red or white).. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Coin. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Shield. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Transparent sheild bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Create a series of curved, tapered lines that originate from the ninja's body and extend outward in the direction of movement. The lines should vary in length and thickness, with a sense of energy and dynamism.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
backgroundMusic
Sound effect
coinCollect
Sound effect
jumpSound
Sound effect
footstepSound1
Sound effect
footstepSound2
Sound effect
footstepSound3
Sound effect
shooterSpawn
Sound effect
destructorSpawn
Sound effect
attackerSpawn
Sound effect
shooterAttack
Sound effect
destructorAttack
Sound effect
attackerAttack
Sound effect
enemyHit
Sound effect
shieldCollect
Sound effect
shieldCollectSound
Sound effect
ninjaGrunt
Sound effect
destructorAttackSound
Sound effect