Package com.shr4pnel.casino.scene
Class SceneManager
java.lang.Object
com.shr4pnel.casino.scene.SceneManager
Handles the currently active scene, switching between scenes and mapping strings to the Scene enum
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SceneManager.Scenestatic Stringstatic SceneManager.ScenegetSceneAsEnum(String prettyName) Gets the active scene as an enumstatic voidsetActiveScene(SceneManager.Scene activeScene) Sets a new active scene
-
Constructor Details
-
SceneManager
public SceneManager()
-
-
Method Details
-
getActiveScene
- Returns:
- The active scene
-
setActiveScene
Sets a new active scene- Parameters:
activeScene- The scene to switch to
-
getActiveScenePretty
- Returns:
- The active scenes human-readable name
-
getSceneAsEnum
Gets the active scene as an enum- Parameters:
prettyName- The human-readable name of the scene- Returns:
- The specified scene, as an emum, or null if the scene does not exist
-