This commit is contained in:
Maciej Caderek
2022-04-19 04:02:39 +02:00
parent 141bfc3fdb
commit 3766e4facf
9 changed files with 45 additions and 13 deletions

View File

@@ -138,6 +138,9 @@ class Player {
case "k":
sfx.pipiTake.play();
break;
case "b":
sfx.toyTake.play();
break;
default:
sfx.take.play();
}
@@ -157,6 +160,9 @@ class Player {
case "k":
sfx.pipiMove.play();
break;
case "b":
sfx.toyMove.play();
break;
default:
sfx.move.play();
}

View File

@@ -61,6 +61,14 @@ const sfx = {
src: ["/sfx/mp3/pipi-take.mp3"],
volume: 0.3,
}),
toyMove: new Howl({
src: ["/sfx/mp3/toy-move.mp3"],
volume: 0.5,
}),
toyTake: new Howl({
src: ["/sfx/toy-take.wav"],
volume: 0.5,
}),
};
export default sfx;