fixed the toggle button for the victory music

added the pause(gameOverMusicV) to the toggle method for the music control
so that it will be paused when the music is turned off.
This commit is contained in:
Hanno Fleischer hanno.fleischer@unibw.de
2024-10-05 09:01:48 +02:00
parent b18705f064
commit 0f629252bc

View File

@@ -106,7 +106,7 @@ public void pause(AudioNode audioNode) {
}
/**
* Toggle Method to control the music
* Toggle Method to control the music to switch it on or off
*/
public void toogleMusic() {
this.musicEnabled = !this.musicEnabled;
@@ -129,6 +129,7 @@ public void toogleMusic() {
pause(menuMusic);
pause(battleMusic);
pause(gameOverMusicL);
pause(gameOverMusicV);
}
prefs.putBoolean(MUSIC_ENABLED_PREF, musicEnabled);