mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed manual test bugs in sounds.
#story[1249]
This commit is contained in:
@@ -100,42 +100,64 @@ public class Sounds {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void playButtonClick() {
|
public static void playButtonClick() {
|
||||||
Media buttonClick = new Media(Sounds.class.getClassLoader().getResource("sounds/Button-click-sound.mp3").toString());
|
if (!soundEffectsMuted) {
|
||||||
|
Media buttonClick = new Media(
|
||||||
|
Sounds.class.getClassLoader().getResource("sounds/Button-click-sound.mp3")
|
||||||
|
.toString());
|
||||||
soundPlayer = new MediaPlayer(buttonClick);
|
soundPlayer = new MediaPlayer(buttonClick);
|
||||||
soundPlayer.play();
|
soundPlayer.play();
|
||||||
soundPlayer.setMute(soundEffectsMuted);
|
soundPlayer.setMute(soundEffectsMuted);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void playFinishSound() {
|
public static void playFinishSound() {
|
||||||
Media finishSound = new Media(Sounds.class.getClassLoader().getResource("sounds/Sms-notification.mp3").toString());
|
if (!soundEffectsMuted) {
|
||||||
|
Media finishSound = new Media(
|
||||||
|
Sounds.class.getClassLoader().getResource("sounds/Sms-notification.mp3")
|
||||||
|
.toString());
|
||||||
soundPlayer = new MediaPlayer(finishSound);
|
soundPlayer = new MediaPlayer(finishSound);
|
||||||
soundPlayer.play();
|
soundPlayer.play();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void playMarkRoundingSound() {
|
public static void playMarkRoundingSound() {
|
||||||
Media markRoundingSound = new Media(Sounds.class.getClassLoader().getResource("sounds/sms-tone.mp3").toString());
|
if (!soundEffectsMuted) {
|
||||||
|
|
||||||
|
Media markRoundingSound = new Media(
|
||||||
|
Sounds.class.getClassLoader().getResource("sounds/sms-tone.mp3").toString());
|
||||||
soundPlayer = new MediaPlayer(markRoundingSound);
|
soundPlayer = new MediaPlayer(markRoundingSound);
|
||||||
soundPlayer.play();
|
soundPlayer.play();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void playCapGunSound() {
|
public static void playCapGunSound() {
|
||||||
Media gunSound = new Media(Sounds.class.getClassLoader().getResource("sounds/Gunshot-sound.mp3").toString());
|
if (!soundEffectsMuted) {
|
||||||
|
|
||||||
|
Media gunSound = new Media(
|
||||||
|
Sounds.class.getClassLoader().getResource("sounds/Gunshot-sound.mp3").toString());
|
||||||
soundPlayer = new MediaPlayer(gunSound);
|
soundPlayer = new MediaPlayer(gunSound);
|
||||||
soundPlayer.play();
|
soundPlayer.play();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void playCrashSound() {
|
public static void playCrashSound() {
|
||||||
Media crashSound = new Media(Sounds.class.getClassLoader().getResource("sounds/Large-metal-door-slam.mp3").toString());
|
if (!soundEffectsMuted) {
|
||||||
|
Media crashSound = new Media(
|
||||||
|
Sounds.class.getClassLoader().getResource("sounds/Large-metal-door-slam.mp3")
|
||||||
|
.toString());
|
||||||
soundPlayer = new MediaPlayer(crashSound);
|
soundPlayer = new MediaPlayer(crashSound);
|
||||||
soundPlayer.play();
|
soundPlayer.play();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void playHoverSound() {
|
public static void playHoverSound() {
|
||||||
|
if (!soundEffectsMuted) {
|
||||||
Media hoverSound = new Media(Sounds.class.getClassLoader().getResource("sounds/sound-over.wav").toString());
|
Media hoverSound = new Media(Sounds.class.getClassLoader().getResource("sounds/sound-over.wav").toString());
|
||||||
soundPlayer = new MediaPlayer(hoverSound);
|
soundPlayer = new MediaPlayer(hoverSound);
|
||||||
soundPlayer.play();
|
soundPlayer.play();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user