diff options
-rw-r--r-- | src/main/SoundController.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/SoundController.java b/src/main/SoundController.java index 55d40f4..0d2061c 100644 --- a/src/main/SoundController.java +++ b/src/main/SoundController.java @@ -35,7 +35,7 @@ public class SoundController songMediaPlayer.play(); } - private void playMenuSong() + public void playMenuSong() { playSong(mainMenuSong); songMediaPlayer.setCycleCount(MediaPlayer.INDEFINITE); @@ -44,7 +44,10 @@ public class SoundController public void endSong() { - playMenuSong(); + if (songMediaPlayer != null) + { + songMediaPlayer.stop(); + } } public void playSfx(File sfxFile) |