Began fixing conflicts with LobbyController

#bug
This commit is contained in:
Calum
2017-07-26 12:05:03 +12:00
parent 9c9f6e4e80
commit 8ac44d13df
6 changed files with 233 additions and 26 deletions
@@ -262,8 +262,15 @@ public class GameView extends Pane {
BoatObject newObject;
for (Yacht yacht : yachts) {
newObject = new BoatObject();
// newObject.bindBoat(boat);
newObject.setFill(Colors.getColor());
boatObjects.put(yacht, newObject);
yacht.addLocationListener((boat, lat, lon, heading, velocity) ->{
BoatObject bo = boatObjects.get(boat);
Point2D p2d = findScaledXY(lat, lon);
bo.setLayoutX(p2d.getX());
bo.setLayoutY(p2d.getY());
// bo.setTrajectory(heading, velocity * (metersPerPixelX + metersPerPixelY) / 2);
});
createAnnotationBox(yacht);
}