Sound effect... WHAAAT?
This commit is contained in:
parent
c448a63b7c
commit
1a0b855d99
BIN
Celebration.mp3
Normal file
BIN
Celebration.mp3
Normal file
Binary file not shown.
@ -239,9 +239,18 @@ function shakeTiles(tiles) {
|
||||
)
|
||||
})
|
||||
}
|
||||
// The CELEBRATION SOUND EFFECT
|
||||
function playCelebrationSound() {
|
||||
const audio = new Audio('celebration.mp3')
|
||||
audio.volume = 0.5 // Adjust volume as needed
|
||||
audio.play().catch(error => {
|
||||
console.error('Error playing celebration sound:', error)
|
||||
})
|
||||
}
|
||||
// IT'S RIGHT HERE YOU BLIND MOFO"
|
||||
function checkWinLose(guess, tiles) {
|
||||
if (guess === targetWord) {
|
||||
playCelebrationSound()
|
||||
showAlert("Congratulations, You win!", 5000)
|
||||
danceTiles(tiles)
|
||||
celebrateWithConfetti()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user