Started work on start screen

- Server now sends out race start status messages during lobby & pre-start stages
- Added timer in lobby

Tags: #story[1109]
This commit is contained in:
Michael Rausch
2017-08-11 19:03:57 +12:00
parent 3ad37faedc
commit d2fd9ebaea
8 changed files with 97 additions and 27 deletions
+6 -3
View File
@@ -20,7 +20,7 @@ public class RaceState {
private long raceTime;
private long expectedStartTime;
private boolean isRaceStarted = false;
// long timeTillStart;
long timeTillStart;
public RaceState() {
}
@@ -38,8 +38,7 @@ public class RaceState {
}
public void updateState (RaceStartData data) {
// this.timeTillStart = data.getRaceStartTime();
System.out.println(data.getRaceStartTime());
this.timeTillStart = data.getRaceStartTime();
}
public String getRaceTimeStr () {
@@ -50,6 +49,10 @@ public class RaceState {
return (expectedStartTime - raceTime) / 1000;
}
public String getTimeTillStartStr () {
return DATE_TIME_FORMAT.format(getTimeTillStart() * 1000);
}
public double getWindSpeed() {
return windSpeed;
}