mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user