Added finish noise.

#story[1249]
This commit is contained in:
Kusal Ekanayake
2017-09-05 13:44:14 +12:00
parent 6ee2517f74
commit 396098e009
5 changed files with 24 additions and 10 deletions
@@ -22,6 +22,10 @@ public class Sounds {
musicPlayer.stop();
}
public static void stopSoundEffects() {
soundEffect.stop();
}
public static void toggleMuteMusic() {
musicMuted = !musicMuted;
musicPlayer.setMute(musicMuted);
@@ -75,6 +79,13 @@ public class Sounds {
soundPlayer.setMute(soundEffectsMuted);
}
public static void playFinishSound() {
Media finishSound = new Media(Sounds.class.getClassLoader().getResource("sounds/Sms-notification.mp3").toString());
soundPlayer = new MediaPlayer(finishSound);
soundPlayer.play();
soundPlayer.setMute(soundEffectsMuted);
}
public static void playCapGunSound() {
Media gunSound = new Media(Sounds.class.getClassLoader().getResource("sounds/Gunshot-sound.mp3").toString());
soundPlayer = new MediaPlayer(gunSound);