mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Linking up course stream with visualiser. Boats moving, and course drawing. Boats however are not moving as intended. Needs to be fixed/looked into.
#story[820] #pair[kre39,cir27]
This commit is contained in:
@@ -117,6 +117,15 @@ public class BoatGroup extends Group{
|
||||
moveBy(dx, dy, rotation);
|
||||
}
|
||||
|
||||
public void setDestination (double newXValue, double newYValue, double rotation) {
|
||||
this.pixelVelocityX = (newXValue - super.getLayoutX()) / expectedUpdateInterval;
|
||||
this.pixelVelocityY = (newYValue - super.getLayoutY()) / expectedUpdateInterval;
|
||||
//this.destinationX = newXValue;
|
||||
//this.destinationY = newYValue;
|
||||
this.rotationalGoal = rotation;
|
||||
this.rotationalVelocity = (rotationalGoal - currentRotation) / expectedUpdateInterval;
|
||||
}
|
||||
|
||||
public void setDestination (double newXValue, double newYValue) {
|
||||
this.pixelVelocityX = (newXValue - super.getLayoutX()) / expectedUpdateInterval;
|
||||
this.pixelVelocityY = (newYValue - super.getLayoutY()) / expectedUpdateInterval;
|
||||
@@ -174,4 +183,8 @@ public class BoatGroup extends Group{
|
||||
super.getChildren().get(2).setVisible(false);
|
||||
super.getChildren().get(3).setVisible(false);
|
||||
}
|
||||
|
||||
public Boat getBoat() {
|
||||
return boat;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user