diff --git a/docs/assets/audio/Sound.ts b/docs/assets/audio/Sound.ts index 31683b1..f8f41a5 100644 --- a/docs/assets/audio/Sound.ts +++ b/docs/assets/audio/Sound.ts @@ -1,18 +1,26 @@ let audio = new Audio(); +let isMuted: boolean = false; export async function playSucess(){ audio.src = "assets/audio/complete.mp3"; audio.load(); - audio.play(); + if(!isMuted) + audio.play(); } export async function playSwap() { audio.src = "assets/audio/swap.mp3"; audio.load(); - audio.play(); + if(!isMuted) + audio.play(); } export async function playFind(){ audio.src = "assets/audio/find.mp3"; audio.load(); - audio.play(); + if(!isMuted) + audio.play(); +} + +export function setMute(val: boolean) { + isMuted = val; } \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 5f7db6d..7a3a69e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -9,9 +9,10 @@ +