Module scene_manager
A global object that creates an entry and transition point for Scenes.
Subclass at your own risk.
SceneManager extends Object
Properties
| current_scene | Scene instance the game engine is currently running. |
| queued_scene | Scene instance that is being transitioned to. |
Instance Methods
| scene_manager:push_scene (scene) | Enqueues a Scene that will be transitioned to at the end of the current frame. |
Hooks
| flip_scene (self) | Called at the end of a frame. |
Globals
| scene_manager | The "singleton" instance of SceneManager. |
Properties
Properties. Significant fields on an instance.- current_scene
- Scene instance the game engine is currently running.
- queued_scene
- Scene instance that is being transitioned to.
Instance Methods
Instance Methods. Must be called on an instance ofClass.
e.g. instance:method("foo")
- scene_manager:push_scene (scene)
-
Enqueues a Scene that will be transitioned to at the
end of the current frame.
Parameters:
- scene Scene The scene to transition to
Hooks
Hooks. Callbacks implemented in subclasses to customize behavior. Hooks are called on individual instances.- flip_scene (self)
-
Called at the end of a frame. This is responsible for
transitioning to the queued_scene .
Parameters:
- self
SceneManager
The
SceneManagerinstance
- self
SceneManager
The
Globals
Globals. Variables that are stored in the global namespace, usually for special purposes.- scene_manager
-
The "singleton" instance of
SceneManager.The game engine is aware of this instance and calls the flip_scene hook on it. Be aware that modifying flip_scene could have adverse effects on the game's ability to function.