Skip to content

Commit

Permalink
Fix music volume issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lorgan3 committed Jul 10, 2024
1 parent a64dacd commit 585173f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sound/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ export const setVolume = (sfxVolume: number, musicVolume: number) => {

if (LAST_MUSIC) {
const s = sound.find(LAST_MUSIC.key);
s.volume = LAST_MUSIC.volume * musicVolume;
s.instances.forEach(
(instance) => (instance.volume = LAST_MUSIC!.volume * musicVolume)
);
}
};

Expand Down

0 comments on commit 585173f

Please sign in to comment.