Package scene
Class SceneManager
java.lang.Object
scene.SceneManager
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds a scene to the pool of the manager instance.The currently active scene.void
void
enable()
This method is used to enable the sceneManager and call all initialization methods on a possible currentScene.float
void
postProcess
(Texture texture) void
render()
sceneIds()
Creates a new set of all known scene ids.void
setMinSceneLight
(float minSceneLight) boolean
switchScene
(int id) Switches the current scene to another scene with the given id, which has to be in the scene pool.boolean
switchScene
(Scene scene, boolean addIfUnknown) Switches the current scene to a given one.void
update()
void
void
updateUI()
-
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
The currently active scene. -
addScene
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
Switches the current scene to a given one.- Parameters:
scene
- the scene to switch toaddIfUnknown
- 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
Creates a new set of all known scene ids. -
update
public void update() -
updateGameObjects
public void updateGameObjects() -
render
public void render() -
postProcess
-
debugRender
public void debugRender() -
getMinSceneLight
public float getMinSceneLight() -
setMinSceneLight
public void setMinSceneLight(float minSceneLight)
-