Completed working boat selection screen.

When a user selects a different boat, it is sent to all other clients and updates accordingly. Boats are all shown with their correct models in game.

#story[1274]
This commit is contained in:
Kusal Ekanayake
2017-09-20 20:46:23 +12:00
parent 7d8a6afa5f
commit 307e79ecfc
12 changed files with 114 additions and 17 deletions
@@ -130,7 +130,8 @@ public class LobbyController implements Initializable {
controller.setPlayerName(this.playerBoats
.get(ViewManager.getInstance().getGameClient().getServerThread().getClientId())
.getBoatName());
controller.setCurrentBoat(BoatMeshType.DINGHY);
controller.setCurrentBoat(this.playerBoats.get(ViewManager.getInstance().getGameClient().getServerThread().getClientId())
.getBoatType());
return customizationDialog;
}
@@ -204,7 +205,7 @@ public class LobbyController implements Initializable {
FXMLLoader loader = new FXMLLoader(
getClass().getResource("/views/cells/PlayerCell.fxml"));
loader.setController(new PlayerCell(playerId, yacht.getBoatName(), yacht.getColour()));
loader.setController(new PlayerCell(playerId, yacht.getBoatName(), yacht.getColour(), yacht.getBoatType()));
try {
pane = loader.load();