Sound effect... WHAAAT?
This commit is contained in:
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"
|
// IT'S RIGHT HERE YOU BLIND MOFO"
|
||||||
function checkWinLose(guess, tiles) {
|
function checkWinLose(guess, tiles) {
|
||||||
if (guess === targetWord) {
|
if (guess === targetWord) {
|
||||||
|
playCelebrationSound()
|
||||||
showAlert("Congratulations, You win!", 5000)
|
showAlert("Congratulations, You win!", 5000)
|
||||||
danceTiles(tiles)
|
danceTiles(tiles)
|
||||||
celebrateWithConfetti()
|
celebrateWithConfetti()
|
||||||
|
|||||||
Reference in New Issue
Block a user