mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Added sounds to coin pick up
Refactored check for token collision to move into the generic check for collision method Created a YachtEventType enum to differentiate between collision and pickup on client side. Client now plays a sound when they pick up a token #story[1250]
This commit is contained in:
@@ -151,6 +151,16 @@ public class Sounds {
|
||||
}
|
||||
}
|
||||
|
||||
public static void playTokenPickupSound() {
|
||||
if (!soundEffectsMuted) {
|
||||
Media pickupSound = new Media(
|
||||
Sounds.class.getClassLoader().getResource("sounds/Coin-pick-up-sound-effect.mp3")
|
||||
.toString());
|
||||
soundPlayer = new MediaPlayer(pickupSound);
|
||||
soundPlayer.play();
|
||||
}
|
||||
}
|
||||
|
||||
public static void playHoverSound() {
|
||||
if (!soundEffectsMuted) {
|
||||
Media hoverSound = new Media(Sounds.class.getClassLoader().getResource("sounds/sound-over.wav").toString());
|
||||
|
||||
Reference in New Issue
Block a user