Code edit (2 edits merged)
Please save this source code
User prompt
Migrate to the latest version of LK
User prompt
use boing sound when player taps on the screen
User prompt
use death sound when dot is destroyed
User prompt
when a dot intesects with start, play star sound
User prompt
make sure death sound plays when dot intersects with obstacle
User prompt
use background to play all the time in loop as the background music of the game.
User prompt
play background on game start and keep in looping
User prompt
make sure background music plays in loop after it finishes
User prompt
when game is runningn always play background in loop
User prompt
on game start start playing background and restart it every 10 seconnds.
User prompt
make sure background stats again every 10 seconds.
User prompt
make sure background also starts playing on game start and after every 10 seconds.
User prompt
on game start play background music
User prompt
when bakcgorund in not playing start it again.
Code edit (1 edits merged)
Please save this source code
User prompt
play background music on game start
User prompt
on tick check if background is playing, if not, then play
===================================================================
--- original.js
+++ change.js
@@ -326,8 +326,9 @@
if (dot.intersects(obstacles[i]) && !(obstacles[i] instanceof OrbitLine)) {
if (!dot.destroyed) {
createDotParticleEffect(dot.x, dot.y);
dot.destroyed = true;
+ LK.getSound('death').play(); // Play death sound
}
dot.destroy();
LK.setTimeout(function () {
LK.showGameOver();