mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
- Added Camera panning to chase camera mode.
tags : #story[1273]
This commit is contained in:
@@ -6,6 +6,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
import java.util.Timer;
|
||||
import javafx.beans.property.ReadOnlyDoubleProperty;
|
||||
import javafx.beans.property.ReadOnlyDoubleWrapper;
|
||||
import javafx.beans.property.ReadOnlyIntegerProperty;
|
||||
@@ -58,6 +59,8 @@ public class ClientYacht extends Observable {
|
||||
private Integer boatStatus;
|
||||
private Double currentVelocity;
|
||||
|
||||
Timer t;
|
||||
|
||||
private BoatObject boatObject;
|
||||
|
||||
private List<YachtLocationListener> locationListeners = new ArrayList<>();
|
||||
@@ -256,7 +259,6 @@ public class ClientYacht extends Observable {
|
||||
this.colour = colour;
|
||||
}
|
||||
|
||||
|
||||
public void updateLocation(double lat, double lng, double heading, double velocity) {
|
||||
setLocation(lat, lng);
|
||||
this.heading = heading;
|
||||
@@ -269,17 +271,7 @@ public class ClientYacht extends Observable {
|
||||
}
|
||||
|
||||
private void setHeadingProperty() {
|
||||
Double oldHeading = getHeadingProperty().get();
|
||||
Double currHeading = heading;
|
||||
while (oldHeading.equals(currHeading)) {
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
oldHeading += 0.5;
|
||||
headingProperty.set(oldHeading);
|
||||
}
|
||||
headingProperty.set(heading);
|
||||
}
|
||||
|
||||
public void addLocationListener(YachtLocationListener listener) {
|
||||
|
||||
Reference in New Issue
Block a user