Sparklines now update with boat position change.

Need to make it work for any amount of boats in the race and to work when the race first starts as it currently only shows one boat.
#story[952]
This commit is contained in:
Kusal Ekanayake
2017-05-19 15:15:05 +12:00
parent 951a726309
commit 422dcd4501
3 changed files with 51 additions and 15 deletions
@@ -128,10 +128,7 @@ public class CanvasController {
long elapsedNanosPerFrame = elapsedNanos / frameTimes.length ;
Double frameRate = 1_000_000_000.0 / elapsedNanosPerFrame ;
drawFps(frameRate.intValue());
System.out.println(elapsedNanos);
if (elapsedNanos % 10 == 0) {
raceViewController.updateSparkLine();
}
raceViewController.checkForPositionChange();
}
// TODO: 1/05/17 cir27 - Make the RaceObjects update on the actual delay.
@@ -319,6 +316,8 @@ public class CanvasController {
}
}
private void drawFps(int fps){
if (raceViewController.isDisplayFps()){
gc.clearRect(5,5,50,20);