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
@@ -11,7 +11,7 @@ import javafx.scene.transform.Rotate;
/**
* BoatGroup is a javafx group that by default contains a graphical objects for representing a 2
* dimensional boat. It contains a single polygon for the boat, a group of lines to show it's path,
* a wake object and two text labels to annotate the boat teams name and the boats velocity. The
* a wake object and two text labels to annotate the boat teams name and the boatTypes velocity. The
* boat will update it's position onscreen everytime UpdatePosition is called unless the window is
* minimized in which case it attempts to store animations and apply them when the window is
* maximised.
@@ -35,8 +35,8 @@ public class BoatObject extends Group {
/**
* Creates a BoatGroup with the default triangular boat polygon.
*/
public BoatObject() {
boatAssets = ModelFactory.boatGameView(BoatMeshType.PIRATE_SHIP, colour);
public BoatObject(BoatMeshType boatMeshType) {
boatAssets = ModelFactory.boatGameView(boatMeshType, colour);
boatAssets.hideSail();
boatAssets.getAssets().getTransforms().addAll(
rotation