Package scene

Class SceneManager

java.lang.Object
scene.SceneManager

public class SceneManager extends Object

Azurite

The SceneManager to handle all scenes of a window instance. It contains a scene pool and a currently active scene.

Since:
16.06.2021
Author:
Juyas
  • Constructor Details

    • SceneManager

      public SceneManager()
  • Method Details

    • enable

      public void enable()
      This method is used to enable the sceneManager and call all initialization methods on a possible currentScene. After this method finished, all newly added scenes will call this methods directly.
    • currentScene

      public Scene currentScene()
      The currently active scene.
    • addScene

      public boolean addScene(Scene scene)
      Adds a scene to the pool of the manager instance. Will call all initialization methods of the scene in preset order
      Returns:
      true, if and only if the scene instance is unique in the pool
      See Also:
    • updateUI

      public void updateUI()
    • switchScene

      public boolean switchScene(Scene scene, boolean addIfUnknown)
      Switches the current scene to a given one.
      Parameters:
      scene - the scene to switch to
      addIfUnknown - whether the scene should be added if the scene is currently unknown to the scene pool
      Returns:
      true if the given scene is now the new current scene
    • switchScene

      public boolean switchScene(int id)
      Switches the current scene to another scene with the given id, which has to be in the scene pool.
      Parameters:
      id - the scene id belonging to the target scene to switch to
      Returns:
      true if the given scene is now the new current scene
    • sceneIds

      public Set<Integer> sceneIds()
      Creates a new set of all known scene ids.
    • update

      public void update()
    • updateGameObjects

      public void updateGameObjects()
    • render

      public void render()
    • postProcess

      public void postProcess(Texture texture)
    • debugRender

      public void debugRender()
    • getMinSceneLight

      public float getMinSceneLight()
    • setMinSceneLight

      public void setMinSceneLight(float minSceneLight)