Merge branch 'master' into spectate_mode_basic

# Conflicts:
#	racevisionGame/src/main/java/visualiser/Controllers/LobbyController.java
This commit is contained in:
fjc40
2017-09-15 00:46:07 +12:00
64 changed files with 1133 additions and 191 deletions
@@ -1,6 +1,8 @@
package visualiser.model;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.paint.Color;
import network.Messages.Enums.BoatStatusEnum;
@@ -62,6 +64,7 @@ public class VisualiserBoat extends Boat {
private ObjectProperty<GPSCoordinate> positionProperty;
private ObjectProperty<Bearing> bearingProperty;
private BooleanProperty hasCollided;
/**
@@ -74,6 +77,7 @@ public class VisualiserBoat extends Boat {
super(boat.getSourceID(), boat.getName(), boat.getCountry());
this.color = color;
this.hasCollided = new SimpleBooleanProperty(false);
}
@@ -253,10 +257,6 @@ public class VisualiserBoat extends Boat {
this.positionProperty.set(position);
}
public ObjectProperty<GPSCoordinate> positionProperty() {
return positionProperty;
}
@Override
public Bearing getBearing() {
return bearingProperty.get();
@@ -270,7 +270,15 @@ public class VisualiserBoat extends Boat {
this.bearingProperty.set(bearing);
}
public ObjectProperty<Bearing> bearingProperty() {
return bearingProperty;
public boolean hasCollided() {
return hasCollided.get();
}
public BooleanProperty hasCollidedProperty() {
return hasCollided;
}
public void setHasCollided(boolean hasCollided) {
this.hasCollided.set(hasCollided);
}
}
@@ -65,7 +65,7 @@ public class VisualiserRaceController implements RunnableWithFramePeriod {
compositeRaceCommand.addCommand(command);
} catch (CommandConstructionException e) {
Logger.getGlobal().log(Level.WARNING, "VisualiserRaceController could not create a command for incoming message.");
//Logger.getGlobal().log(Level.WARNING, "VisualiserRaceController could not create a command for incoming message.");
} catch (InterruptedException e) {
Logger.getGlobal().log(Level.SEVERE, "VisualiserRaceController was interrupted on thread: " + Thread.currentThread() + " while waiting for messages.");