mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Merge branch 'develop' into Story1248_Game_App_Scaling
This commit is contained in:
@@ -322,8 +322,8 @@ public class GameState implements Runnable {
|
||||
checkPowerUpTimeout(yacht);
|
||||
yacht.runAutoPilot();
|
||||
yacht.updateLocation(timeInterval);
|
||||
checkCollision(yacht);
|
||||
if (yacht.getBoatStatus() != BoatStatus.FINISHED) {
|
||||
checkCollision(yacht);
|
||||
checkForLegProgression(yacht);
|
||||
raceFinished = false;
|
||||
}
|
||||
@@ -403,7 +403,6 @@ public class GameState implements Runnable {
|
||||
serverYacht.setLocation(
|
||||
calculateBounceBack(serverYacht, originalLocation, BOUNCE_DISTANCE_YACHT)
|
||||
);
|
||||
System.out.println("DID BOUNCE BACK");
|
||||
serverYacht.setCurrentVelocity(
|
||||
serverYacht.getCurrentVelocity() * COLLISION_VELOCITY_PENALTY
|
||||
);
|
||||
@@ -424,7 +423,6 @@ public class GameState implements Runnable {
|
||||
calculateBounceBack(serverYacht, collidedMark, BOUNCE_DISTANCE_MARK)
|
||||
);
|
||||
|
||||
System.out.println("DID BOUNCE BACK2");
|
||||
serverYacht.setCurrentVelocity(
|
||||
serverYacht.getCurrentVelocity() * COLLISION_VELOCITY_PENALTY
|
||||
);
|
||||
@@ -440,7 +438,6 @@ public class GameState implements Runnable {
|
||||
BOUNCE_DISTANCE_YACHT)
|
||||
);
|
||||
|
||||
System.out.println("DID BOUNCE BACK3");
|
||||
serverYacht.setCurrentVelocity(
|
||||
serverYacht.getCurrentVelocity() * COLLISION_VELOCITY_PENALTY
|
||||
);
|
||||
|
||||
@@ -191,7 +191,7 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
||||
GameState.spawnNewToken();
|
||||
broadcastMessage(MessageFactory.getRaceXML());
|
||||
}
|
||||
}, 0, 60000);
|
||||
}, 10000, 60000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,8 +14,9 @@ public class Sounds {
|
||||
private static MediaPlayer musicPlayer;
|
||||
private static MediaPlayer soundEffect;
|
||||
private static MediaPlayer soundPlayer;
|
||||
private static AudioClip hoverSoundPlayer = new AudioClip(Sounds.class.getClassLoader().getResource("sounds/sound-over.wav").toExternalForm());;
|
||||
private static MediaPlayer hoverSoundPlayer;
|
||||
|
||||
private static boolean hoverInitialized = false;
|
||||
private static boolean musicMuted = false;
|
||||
private static boolean soundEffectsMuted = false;
|
||||
|
||||
@@ -168,7 +169,17 @@ public class Sounds {
|
||||
|
||||
public static void playHoverSound() {
|
||||
if (!soundEffectsMuted) {
|
||||
hoverSoundPlayer.setVolume(2.5);
|
||||
if (!hoverInitialized) {
|
||||
Media crashSound = new Media(
|
||||
Sounds.class.getClassLoader().getResource("sounds/Error-sound-effect.mp3")
|
||||
.toString());
|
||||
hoverSoundPlayer = new MediaPlayer(crashSound);
|
||||
hoverInitialized = true;
|
||||
}
|
||||
hoverSoundPlayer.setVolume(0.5);
|
||||
if (hoverSoundPlayer != null) {
|
||||
hoverSoundPlayer.stop();
|
||||
}
|
||||
hoverSoundPlayer.play();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user