mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Luffing sails animation working correctly, working on sailsin animation now.
#story[1111] #pair[kre39,ptg19]
This commit is contained in:
@@ -81,6 +81,7 @@ public class GameView extends Pane {
|
||||
private int frameTimeIndex = 0;
|
||||
private boolean arrayFilled = false;
|
||||
private Yacht playerYacht;
|
||||
private double windDir = 0.0;
|
||||
|
||||
private enum ScaleDirection {
|
||||
HORIZONTAL,
|
||||
@@ -328,7 +329,7 @@ public class GameView extends Pane {
|
||||
yacht.addLocationListener((boat, lat, lon, heading, velocity, sailIn) ->{
|
||||
BoatObject bo = boatObjects.get(boat);
|
||||
Point2D p2d = findScaledXY(lat, lon);
|
||||
bo.moveTo(p2d.getX(), p2d.getY(), heading, velocity, sailIn, 95.0);
|
||||
bo.moveTo(p2d.getX(), p2d.getY(), heading, velocity, sailIn, windDir);
|
||||
// annotations.get(boat).setLayoutX(p2d.getX());
|
||||
// annotations.get(boat).setLayoutY(p2d.getY());
|
||||
// annotations.get(boat).setLocation(100d, 100d);
|
||||
@@ -566,6 +567,12 @@ public class GameView extends Pane {
|
||||
timer.stop();
|
||||
}
|
||||
|
||||
|
||||
public void setWindDir(double windDir) {
|
||||
this.windDir = windDir;
|
||||
}
|
||||
|
||||
|
||||
public void startRace () {
|
||||
timer.start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user