Added chat functionality & timer back into the game + bug fixes

- Added chat back into the game
- Fixed a bug where the timer would show "race finished" when the race hadn't started
- Fixed a bug where resources weren't being deallocated when the game was closed

Tags: #story[1246]
This commit is contained in:
Michael Rausch
2017-09-12 01:31:38 +12:00
parent d223d393fa
commit 5dd936f8f1
11 changed files with 166 additions and 68 deletions
@@ -217,11 +217,7 @@ public class GameClient {
raceView = fxmlLoader.getController();
ClientYacht player = allBoatsMap.get(socketThread.getClientId());
raceView.loadRace(allBoatsMap, courseData, raceState, player);
raceView.getSendPressedProperty().addListener((obs, old, isPressed) -> {
if (isPressed) {
formatAndSendChatMessage(raceView.readChatInput());
}
});
}
@@ -338,6 +334,12 @@ public class GameClient {
ClientYacht player = allBoatsMap.get(socketThread.getClientId());
raceView.loadRace(allBoatsMap, courseData, raceState, player);
raceView.getSendPressedProperty().addListener((obs, old, isPressed) -> {
if (isPressed) {
formatAndSendChatMessage(raceView.readChatInput());
}
});
}
}