mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
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:
@@ -24,11 +24,13 @@ public class PlayerCell {
|
||||
private String name;
|
||||
private Color boatColor;
|
||||
private Integer playerId;
|
||||
private BoatMeshType boatype;
|
||||
|
||||
public PlayerCell(Integer playerId, String playerName, Color color) {
|
||||
public PlayerCell(Integer playerId, String playerName, Color color, String boatType) {
|
||||
this.playerId = playerId;
|
||||
this.name = playerName;
|
||||
this.boatColor = color;
|
||||
this.boatype = BoatMeshType.getBoatMeshType(boatType);
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
@@ -37,7 +39,7 @@ public class PlayerCell {
|
||||
// Add Rotating Boat to Player Cell with players color on it.
|
||||
Group group = new Group();
|
||||
boatPane.getChildren().add(group);
|
||||
BoatModel bo = ModelFactory.boatIconView(BoatMeshType.PIRATE_SHIP, this.boatColor);
|
||||
BoatModel bo = ModelFactory.boatIconView(this.boatype, this.boatColor);
|
||||
group.getChildren().add(bo.getAssets());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user