fixed BackgroundMusic
before play a new music, the volume prefences should be set
This commit is contained in:
		@@ -181,6 +181,7 @@ private void gameMusic() {
 | 
			
		||||
        if (isEnabled() && gameMusic != null) {
 | 
			
		||||
            stopAll();
 | 
			
		||||
            LOGGER.log(Level.INFO, "Playing game music"); //NON-NLS
 | 
			
		||||
            PREFERENCES.putFloat(VOLUME_PREF, volume);
 | 
			
		||||
            gameMusic.play();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@@ -192,6 +193,7 @@ private void victoryMusic() {
 | 
			
		||||
        if (isEnabled() && victoryMusic != null) {
 | 
			
		||||
            stopAll();
 | 
			
		||||
            LOGGER.log(Level.INFO, "Playing victory music"); //NON-NLS
 | 
			
		||||
            PREFERENCES.putFloat(VOLUME_PREF, volume);
 | 
			
		||||
            victoryMusic.play();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@@ -203,6 +205,7 @@ private void defeatMusic() {
 | 
			
		||||
        if (isEnabled() && defeatMusic != null) {
 | 
			
		||||
            stopAll();
 | 
			
		||||
            LOGGER.log(Level.INFO, "Playing defeat music"); //NON-NLS
 | 
			
		||||
            PREFERENCES.putFloat(VOLUME_PREF, volume);
 | 
			
		||||
            defeatMusic.play();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user