Sharks are now seeable
This commit is contained in:
@@ -482,6 +482,10 @@ public class RaceViewController extends Controller {
|
||||
// }
|
||||
// boat.legProperty().addListener((o, prev, curr) -> Platform.runLater(() -> swapColours(curr)));
|
||||
|
||||
//next mark indicator
|
||||
changeNextMark(boat.getCurrentLeg());
|
||||
viewSubjects.add(Assets3D.ccwNextArrow);
|
||||
viewSubjects.add(Assets3D.cwNextArrow);
|
||||
boat.legProperty().addListener((o, prev, curr) -> Platform.runLater(() -> changeNextMark(curr)));
|
||||
} else {
|
||||
viewSubjects.add(boatModel);
|
||||
@@ -502,11 +506,6 @@ public class RaceViewController extends Controller {
|
||||
sailsSubject.setHeading(visualiserRace.getVisualiserRaceState().getWindDirection().degrees());
|
||||
viewSubjects.add(sailsSubject);
|
||||
|
||||
//next mark indicator
|
||||
changeNextMark(boat.getCurrentLeg());
|
||||
viewSubjects.add(Assets3D.ccwNextArrow);
|
||||
viewSubjects.add(Assets3D.cwNextArrow);
|
||||
|
||||
|
||||
// SeagullFlock seagullFlock = new SeagullFlock(67, 43, 0);
|
||||
//// seagullFlock.addToFlock();
|
||||
@@ -1045,6 +1044,17 @@ public class RaceViewController extends Controller {
|
||||
if(boat.getHealth()<=0){
|
||||
//Boat is dead. Don't check it anymore for hp
|
||||
fp.displayDeath(fp.getSourceID()==raceState.getPlayerBoatID());
|
||||
Annotation3D sharks = new Annotation3D(Assets3D.getSharks());
|
||||
sharks.setX(gpsConverter.convertGPS(boat.getPosition()).getX());
|
||||
sharks.setZ(gpsConverter.convertGPS(boat.getPosition()).getY());
|
||||
viewSubjects.add(sharks);
|
||||
new AnimationTimer(){
|
||||
@Override
|
||||
public void handle(long now) {
|
||||
sharks.setHeading(sharks.getHeading().getAngle() - 3);
|
||||
}
|
||||
}.start();
|
||||
|
||||
fp.setSourceID(0);
|
||||
try {
|
||||
raceState.getBoat(boat.getSourceID()).setStatus(BoatStatusEnum.DNF);
|
||||
|
||||
@@ -28,6 +28,7 @@ public class Assets3D {
|
||||
public static Subject3D ccwNextArrow;
|
||||
public static SkyBox skyBox;
|
||||
public static Subject3D boatHighlight;
|
||||
public static Subject3D sharks;
|
||||
|
||||
public static void loadAssets(){
|
||||
loadSails();
|
||||
@@ -144,6 +145,11 @@ public class Assets3D {
|
||||
windArrow = new Annotation3D(loadX3d(arrowPath));
|
||||
}
|
||||
|
||||
public static Shape3D getSharks(){
|
||||
String path = "assets/V1.0 Sharks.x3d";
|
||||
return loadX3d(path);
|
||||
}
|
||||
|
||||
public static Shape3D loadX3d(String path){
|
||||
X3dModelImporter x3dModelImporter = new X3dModelImporter();
|
||||
URL asset = Assets3D.class.getClassLoader().getResource(path);
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Reference in New Issue
Block a user