Esempio n. 1
0
  private void setupSceneGraph() {
    rootNode.attachChild(ocean);
    ocean.getReflectedNode().attachChild(scene); // node used to render reflection effect in ocean

    scene.attachChild(sheepGroup);
    attachLandscape();
  }
Esempio n. 2
0
  protected void cleanup() {
    super.cleanup();

    if (ocean != null) {
      ocean.getWaterRenderPass().cleanup();
    }
    if (gameAudioSystem != null) {
      gameAudioSystem.cleanup();
    }
  }
Esempio n. 3
0
  private void setupRenderPasses() {
    pManager.add(ocean.getWaterRenderPass());

    RenderPass rootPass = new RenderPass();
    rootPass.add(sky);
    rootPass.add(ocean);
    pManager.add(rootPass);

    shadowPass.add(scene);
    shadowPass.addOccluder(sheepGroup);
    pManager.add(shadowPass);

    RenderPass statPass = new RenderPass();
    statPass.add(planting);
    statPass.add(statNode);
    pManager.add(statPass);
  }
Esempio n. 4
0
 private void attachLandscape() {
   scene.attachChild(islandTerrain);
   world.setIslandTerrain(islandTerrain);
   ocean.getProjectedGrid().setTerrainBlock(islandTerrain.getTerrainBlock());
 }
Esempio n. 5
0
 private void detachLandscape() {
   scene.detachChild(islandTerrain);
   world.setIslandTerrain(null);
   ocean.getProjectedGrid().setTerrainBlock(null);
 }