Skip to content

Commit

Permalink
Update music.js
Browse files Browse the repository at this point in the history
  • Loading branch information
7underlines authored Aug 27, 2024
1 parent 97fb374 commit 8dcf3fd
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions www/assets/js/music.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,16 @@ document.querySelector("#title-screen").addEventListener("click", function () {
});

document.addEventListener("visibilitychange", function () {
bgmDungeon.stop();
bgmBattleMain.stop();
bgmBattleGuardian.stop();
bgmBattleBoss.stop();
if (bgmDungeon != undefined) {
bgmDungeon.stop();
}
if (bgmBattleMain != undefined) {
bgmBattleMain.stop();
}
if (bgmBattleBoss != undefined) {
bgmBattleBoss.stop();
}
if (bgmBattleGuardian != undefined) {
bgmBattleGuardian.stop();
}
});

0 comments on commit 8dcf3fd

Please sign in to comment.