mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed finish screen switch
tags: #fix
This commit is contained in:
@@ -235,7 +235,7 @@ public class GameState implements Runnable {
|
|||||||
// TODO: 15/08/17 remove magic numbers from these equations.
|
// TODO: 15/08/17 remove magic numbers from these equations.
|
||||||
if (yacht.getSailIn()) {
|
if (yacht.getSailIn()) {
|
||||||
if (velocity < maxBoatSpeed - 500) {
|
if (velocity < maxBoatSpeed - 500) {
|
||||||
yacht.changeVelocity(maxBoatSpeed / 150);
|
yacht.changeVelocity(maxBoatSpeed / 100);
|
||||||
} else if (velocity > maxBoatSpeed + 500) {
|
} else if (velocity > maxBoatSpeed + 500) {
|
||||||
yacht.changeVelocity(-maxBoatSpeed / 100);
|
yacht.changeVelocity(-maxBoatSpeed / 100);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -159,8 +159,11 @@ public class GameClient {
|
|||||||
FXMLLoader fxmlLoader = new FXMLLoader(
|
FXMLLoader fxmlLoader = new FXMLLoader(
|
||||||
getClass().getResource("/views/FinishScreenView.fxml"));
|
getClass().getResource("/views/FinishScreenView.fxml"));
|
||||||
try {
|
try {
|
||||||
|
final Node finishScreenFX = fxmlLoader.load();
|
||||||
|
Platform.runLater(() -> {
|
||||||
holderPane.getChildren().clear();
|
holderPane.getChildren().clear();
|
||||||
holderPane.getChildren().add(fxmlLoader.load());
|
holderPane.getChildren().add(finishScreenFX);
|
||||||
|
});
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user