Added preliminary icons for pickups

RaceView now has a grid pane to contain some icons to display power ups. These are just preliminary

ClientYacht now has a power up field that is set from recieveing messages in the Game Client, as well as observed by the RaceViewController to display the relevant icon when the powerup field is changed

#story[1245]
This commit is contained in:
William Muir
2017-09-19 23:04:17 +12:00
parent 78596ea111
commit 52d3cea592
5 changed files with 139 additions and 15 deletions
@@ -47,6 +47,7 @@ public class GameState implements Runnable {
private static final Double BOUNCE_DISTANCE_MARK = 20.0;
public static final Double BOUNCE_DISTANCE_YACHT = 30.0;
private static final Double COLLISION_VELOCITY_PENALTY = 0.3;
private static final Integer VELOCITY_BOOST_MULTIPLIER = 2;
private static Long previousUpdateTime;
public static Double windDirection;
@@ -453,8 +454,7 @@ public class GameState implements Runnable {
Double maxBoatSpeed = GeoUtility.knotsToMMS(boatSpeedInKnots) * speedMultiplier;
if (yacht.getPowerUp() != null) {
if (yacht.getPowerUp().equals(TokenType.BOOST)) {
// TODO: 11/09/17 wmu16 CHANGE THIS TO MAGIC NUMBER
maxBoatSpeed *= 2;
maxBoatSpeed *= VELOCITY_BOOST_MULTIPLIER;
}
}