diff --git a/src/main/java/seng302/gameServer/GameState.java b/src/main/java/seng302/gameServer/GameState.java index 34f31867..8f7975fe 100644 --- a/src/main/java/seng302/gameServer/GameState.java +++ b/src/main/java/seng302/gameServer/GameState.java @@ -341,7 +341,7 @@ public class GameState implements Runnable { private void spawnNewToken() { tokensInPlay.clear(); Token token = randomSpawn.getRandomToken(); -// token.assignType(TokenType.RANDOM); +// token.assignType(TokenType.WIND_WALKER); logger.debug("Spawned token of type " + token.getTokenType()); tokensInPlay.add(token); MessageFactory.updateTokens(tokensInPlay); diff --git a/src/main/java/seng302/visualiser/fxObjects/assets_3D/BoatMeshType.java b/src/main/java/seng302/visualiser/fxObjects/assets_3D/BoatMeshType.java index cf01d85e..5c659c9c 100644 --- a/src/main/java/seng302/visualiser/fxObjects/assets_3D/BoatMeshType.java +++ b/src/main/java/seng302/visualiser/fxObjects/assets_3D/BoatMeshType.java @@ -12,7 +12,8 @@ public enum BoatMeshType { 0.997, null, false, 1.0, 1.4, 2.0), PIRATE_SHIP("pirateship_hull.stl", "pirateship_mast.stl", -0.5415, "pirateship_mainsail.stl", -0.5415, "pirateship_frontsail.stl", true, 1.2, 1.6, 1.2), - DUCKY("ducky_hull.stl", "ducky_mast.stl", -2.18539, "ducky_sail.stl", -2.18539, "ducky_eyes.stl", false, 1.2, 1.1, 1.4); + DUCKY("ducky_hull.stl", "ducky_mast.stl", -2.18539, "ducky_sail.stl", -2.18539, "ducky_eyes.stl", false, 1.2, 1.1, 1.4), + PARROT("parrot_hull.stl", null, 0, "parrot_sail.stl", 0, "parrot_features.stl", true, 1, 1, 1); final String hullFile, mastFile, sailFile, jibFile; final double mastOffset, sailOffset; @@ -20,7 +21,7 @@ public enum BoatMeshType { public final double accelerationMultiplier; public final double turnStep; final boolean fixedSail; - final static BoatMeshType[] boatTypes = new BoatMeshType[]{DINGHY, CATAMARAN, PIRATE_SHIP, DUCKY}; + final static BoatMeshType[] boatTypes = new BoatMeshType[]{DINGHY, CATAMARAN, PIRATE_SHIP, DUCKY, PARROT}; BoatMeshType(String hullFile, String mastFile, double mastOffset, String sailFile, double sailOffset, String jibFile, boolean fixedSail, double maxSpeedMultiplier, double accelerationMultiplier, double turnStep) { diff --git a/src/main/java/seng302/visualiser/fxObjects/assets_3D/ModelFactory.java b/src/main/java/seng302/visualiser/fxObjects/assets_3D/ModelFactory.java index 6d129f5e..8ca060c6 100644 --- a/src/main/java/seng302/visualiser/fxObjects/assets_3D/ModelFactory.java +++ b/src/main/java/seng302/visualiser/fxObjects/assets_3D/ModelFactory.java @@ -7,7 +7,6 @@ import javafx.geometry.Point3D; import javafx.scene.AmbientLight; import javafx.scene.CacheHint; import javafx.scene.Group; -import javafx.scene.PointLight; import javafx.scene.paint.Color; import javafx.scene.paint.PhongMaterial; import javafx.scene.shape.Circle; @@ -118,17 +117,25 @@ public class ModelFactory { Group boatAssets = new Group(); MeshView hull = importSTL(boatType.hullFile); hull.setMaterial(new PhongMaterial(primaryColour)); - MeshView mast = importSTL(boatType.mastFile); - mast.setMaterial(new PhongMaterial(primaryColour)); MeshView sail = importSTL(boatType.sailFile); - sail.setMaterial(new PhongMaterial(Color.WHITE)); + sail.setMaterial( + new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.BLACK : Color.WHITE) + ); + + boatAssets.getChildren().addAll(hull, sail); + + if (boatType.mastFile != null) { + MeshView mast = importSTL(boatType.mastFile); + mast.setMaterial(new PhongMaterial(primaryColour)); + boatAssets.getChildren().add(mast); + } if (boatType.jibFile != null) { MeshView jib = importSTL(boatType.jibFile); - sail.setMaterial(new PhongMaterial(Color.WHITE)); - boatAssets.getChildren().addAll(hull, mast, sail, jib); - } else { - boatAssets.getChildren().addAll(hull, mast, sail); + sail.setMaterial( + new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.DARKGRAY : Color.WHITE) + ); + boatAssets.getChildren().add(jib); } return boatAssets; diff --git a/src/main/resources/meshes/boatSTLs/parrot_features.stl b/src/main/resources/meshes/boatSTLs/parrot_features.stl new file mode 100644 index 00000000..89072cfa Binary files /dev/null and b/src/main/resources/meshes/boatSTLs/parrot_features.stl differ diff --git a/src/main/resources/meshes/boatSTLs/parrot_hull.stl b/src/main/resources/meshes/boatSTLs/parrot_hull.stl new file mode 100644 index 00000000..4e97d286 Binary files /dev/null and b/src/main/resources/meshes/boatSTLs/parrot_hull.stl differ diff --git a/src/main/resources/meshes/boatSTLs/parrot_sail.stl b/src/main/resources/meshes/boatSTLs/parrot_sail.stl new file mode 100644 index 00000000..929a050f Binary files /dev/null and b/src/main/resources/meshes/boatSTLs/parrot_sail.stl differ