win and lose sounds based on boss outcome
Some checks are pending
CI / Foundry project (push) Waiting to run

This commit is contained in:
mindxploit 2024-11-03 13:12:30 +01:00
parent 91185efa18
commit bd0cc6c34d

View File

@ -1,8 +1,9 @@
// https://sfxr.me/ // https://sfxr.me/
// https://github.com/chr15m/jsfxr?tab=readme-ov-file#library // https://github.com/chr15m/jsfxr?tab=readme-ov-file#library
// https://github.com/goldfire/howler.js
import { sfxr } from "jsfxr"; import { sfxr } from "jsfxr";
import { Howl, Howler } from "howler"; import { Howl } from "howler";
export const coinSound = () => { export const coinSound = () => {
const coin = sfxr.toAudio( const coin = sfxr.toAudio(
@ -30,7 +31,6 @@ export const lostSound = () => {
src: ["/sounds/lost.wav"], src: ["/sounds/lost.wav"],
}); });
// Play the sound.
fail.play(); fail.play();
}; };
@ -39,6 +39,5 @@ export const wonSound = () => {
src: ["/sounds/arcade_win.wav"], src: ["/sounds/arcade_win.wav"],
}); });
// Play the sound.
won.play(); won.play();
}; };