mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed race timer to display real race time, and made race time scalable.
#story[445]
This commit is contained in:
@@ -150,7 +150,7 @@ public class CanvasController {
|
||||
*/
|
||||
private void drawWake(GraphicsContext gc, double x, double y, double speed, Color color, double heading){
|
||||
double angle = Math.toRadians(heading);
|
||||
speed = speed * 10;
|
||||
speed = speed * 2;
|
||||
Point newP = new Point(0, speed);
|
||||
newP.rotate(angle);
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ public class RaceViewController {
|
||||
for (Event event : events) {
|
||||
if (event.getIsFinishingEvent()) {
|
||||
keyFrames.add(
|
||||
new KeyFrame(Duration.seconds(event.getTime() / 60 / 60 / 5),
|
||||
new KeyFrame(Duration.seconds(event.getTime()),
|
||||
onFinished -> {race.setBoatFinished(boat); handleEvent(event);},
|
||||
new KeyValue(x, event.getThisMark().getLatitude()),
|
||||
new KeyValue(y, event.getThisMark().getLongitude())
|
||||
@@ -135,7 +135,7 @@ public class RaceViewController {
|
||||
);
|
||||
} else {
|
||||
keyFrames.add(
|
||||
new KeyFrame(Duration.seconds(event.getTime() / 60 / 60 / 5),
|
||||
new KeyFrame(Duration.seconds(event.getTime()),
|
||||
onFinished ->{
|
||||
handleEvent(event);
|
||||
boat.setHeading(event.getBoatHeading());
|
||||
|
||||
Reference in New Issue
Block a user