mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Got the boat's to track and center correctly.
As well as allowing selecting different boats to track them, doesn't work as intuitively as I would like but will need to sort out a boat selection feature first made specifically for the selection of only one boat. #story[1121]
This commit is contained in:
@@ -40,7 +40,8 @@ public class BoatObject extends Group {
|
||||
private double distanceTravelled, lastRotation;
|
||||
private Point2D lastPoint;
|
||||
private Paint colour = Color.BLACK;
|
||||
private Boolean isSelected, destinationSet; //All boats are initialised as selected
|
||||
private Boolean isSelected = false, destinationSet; //All boats are initialised as selected
|
||||
private Boolean isBeingTracked = false;
|
||||
private boolean isPlayer = false;
|
||||
|
||||
/**
|
||||
@@ -287,6 +288,7 @@ public class BoatObject extends Group {
|
||||
|
||||
public void setIsSelected(Boolean isSelected) {
|
||||
this.isSelected = isSelected;
|
||||
this.isBeingTracked = isSelected;
|
||||
setLineGroupVisible(isSelected);
|
||||
setWakeVisible(isSelected);
|
||||
setLayLinesVisible(isSelected);
|
||||
@@ -364,6 +366,14 @@ public class BoatObject extends Group {
|
||||
lastHeading = heading;
|
||||
}
|
||||
|
||||
public Boolean getBeingTracked() {
|
||||
return isBeingTracked;
|
||||
}
|
||||
|
||||
public Boolean getSelected() {
|
||||
return isSelected;
|
||||
}
|
||||
|
||||
public void setTrajectory(double heading, double velocity, double scaleFactorX, double scaleFactorY) {
|
||||
// wake.setRotation(lastHeading - heading, velocity);
|
||||
// rotateTo(heading);
|
||||
|
||||
Reference in New Issue
Block a user