Added ocean object

This commit is contained in:
Calum
2017-09-09 12:34:08 +12:00
parent c2c3c9eb53
commit 0e2946f20b
4 changed files with 118 additions and 4 deletions
@@ -39,6 +39,7 @@ public class GameView3D {
root3D, 1000, 1000, true, SceneAntialiasing.BALANCED
);
view.setCamera(camera);
view.setFill(Color.SKYBLUE);
Sphere s = new Sphere(1);
s.setMaterial(new PhongMaterial(Color.RED));
Sphere left = new Sphere(1);
@@ -72,7 +73,13 @@ public class GameView3D {
Node coin = ModelFactory.importModel(ModelType.VELOCITY_COIN).getAssets();
coin.setTranslateX(coin.getTranslateX() - 30);
gameObjects.getChildren().addAll(s, left, right, top, bottom, boat, boat2, boat3, sMarker, fMarker, marker, coin);
gameObjects.getChildren().addAll(
ModelFactory.importModel(ModelType.OCEAN).getAssets(),
s, left, right, top, bottom,
boat, boat2, boat3,
sMarker, fMarker, marker,
coin
);
view.sceneProperty().addListener((obs, old, scene) -> {
if (scene!=null)
enableCameraMovement(scene);