added the backgroundmusic to listeners in the initsimpleapp

and not in the getter of backgroundmusic.
This commit is contained in:
Hanno Fleischer hanno.fleischer@unibw.de
2024-10-05 21:07:00 +02:00
parent 9dc3984f35
commit 4820a76ff0

View File

@@ -238,6 +238,7 @@ public void simpleInitApp() {
mainVolume = new MainVolume(this);
backgroundMusic = new BackgroundMusic(this);
logic.addListener(backgroundMusic);
}
/**
@@ -446,7 +447,6 @@ void errorDialog(String errorMessage) {
* @return BackgroundMusic
*/
public BackgroundMusic getBackgroundMusic(){
logic.addListener(backgroundMusic);
return backgroundMusic;
}