Turned handling into a multiplier.

#story[1274]
This commit is contained in:
Kusal Ekanayake
2017-09-22 17:42:32 +12:00
parent 9f64b2380d
commit 52dc7a956d
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ public class ServerYacht {
//Boat info //Boat info
private String boatType; private String boatType;
private Double turnStep = 10.0; private Double turnStep = 5.0;
private Double maxSpeedMultiplier = 1.0; private Double maxSpeedMultiplier = 1.0;
private Double acceleration = 1.0; private Double acceleration = 1.0;
private Integer sourceId; private Integer sourceId;
@@ -427,7 +427,7 @@ public class ServerYacht {
for (BoatMeshType boatMesh: BoatMeshType.values()) { for (BoatMeshType boatMesh: BoatMeshType.values()) {
if (Objects.equals(boatType, boatMesh.toString())) { if (Objects.equals(boatType, boatMesh.toString())) {
boatMeshType = boatMesh; boatMeshType = boatMesh;
turnStep = boatMeshType.turnStep; turnStep = turnStep * boatMeshType.turnStep;
maxSpeedMultiplier = boatMeshType.maxSpeedMultiplier; maxSpeedMultiplier = boatMeshType.maxSpeedMultiplier;
acceleration = boatMeshType.accelerationMultiplier; acceleration = boatMeshType.accelerationMultiplier;
} }
@@ -57,7 +57,7 @@ public class BoatCustomizeController implements Initializable{
private LobbyController lobbyController; private LobbyController lobbyController;
private BoatMeshType currentBoat; private BoatMeshType currentBoat;
private Double maxSpeedMultiplier = 1.0; private Double maxSpeedMultiplier = 1.0;
private Double maxTurnRate = 10.0; private Double maxTurnRate = 1.0;
private Double maxAcceleration = 1.0; private Double maxAcceleration = 1.0;
@Override @Override
@@ -7,11 +7,11 @@ package seng302.visualiser.fxObjects.assets_3D;
*/ */
public enum BoatMeshType { public enum BoatMeshType {
DINGHY("dinghy_hull.stl", "dinghy_mast.stl", 1.36653, "dinghy_sail.stl", 1.36653, null, false, 1.7, 1.0, 5.0), DINGHY("dinghy_hull.stl", "dinghy_mast.stl", 1.36653, "dinghy_sail.stl", 1.36653, null, false, 1.7, 1.0, 1.0),
CAT_ATE_A_MERINGUE("catamaran_hull.stl", "catamaran_mast.stl", 0.997, "catamaran_sail.stl", CAT_ATE_A_MERINGUE("catamaran_hull.stl", "catamaran_mast.stl", 0.997, "catamaran_sail.stl",
0.997, null, false, 1.0, 1.4, 10.0), 0.997, null, false, 1.0, 1.4, 2.0),
PIRATE_SHIP("pirateship_hull.stl", "pirateship_mast.stl", -0.5415, "pirateship_mainsail.stl", PIRATE_SHIP("pirateship_hull.stl", "pirateship_mast.stl", -0.5415, "pirateship_mainsail.stl",
-0.5415, "pirateship_frontsail.stl", true, 1.2, 1.6, 6.0); -0.5415, "pirateship_frontsail.stl", true, 1.2, 1.6, 1.2);
final String hullFile, mastFile, sailFile, jibFile; final String hullFile, mastFile, sailFile, jibFile;
final double mastOffset, sailOffset; final double mastOffset, sailOffset;