WIP: Yachts now power up upon collecting an item

Power up is speed boost x2 multiplier
Lasts 10 seconds
Do not stack

#story[1250]
This commit is contained in:
William Muir
2017-08-29 22:11:37 +12:00
parent 0d0b2e59d5
commit 4bd7291a4a
4 changed files with 42 additions and 13 deletions
+11 -1
View File
@@ -53,6 +53,7 @@ public class ServerYacht {
//PowerUp
private TokenType powerUp;
private Long powerUpStartTime;
public ServerYacht(String boatType, Integer sourceId, String hullID, String shortName,
@@ -104,8 +105,17 @@ public class ServerYacht {
location = geoPoint;
}
public void setPowerUp(TokenType powerUp) {
public void powerUp(TokenType powerUp) {
this.powerUp = powerUp;
powerUpStartTime = System.currentTimeMillis();
}
public void powerDown() {
this.powerUp = null;
}
public Long getPowerUpStartTime() {
return powerUpStartTime;
}
public TokenType getPowerUp() {