Trait components::prelude::SceneManager
[−]pub trait SceneManager {
fn scene(&self) -> Box<dyn EngineScene + 'static, Global>;
fn set_scene(&self, kind: SceneKind);
fn back(&self);
fn next(&self);
fn restart(&self);
}
Expand description
The SceneManager should be implemented by objects intended to manage the EngineScene state machine.
Only a single scene is active at any given update. Which scene is configured by this manager.
Required Methods
fn scene(&self) -> Box<dyn EngineScene + 'static, Global>
fn scene(&self) -> Box<dyn EngineScene + 'static, Global>
The currently active scene. Use as a runtime property and not as an initialization property.
fn back(&self)
fn back(&self)
Sets the current scene to the scene returned by Factory::get_back_scene_type(). The new scene should be representative of retreat. @see Factory::get_back_scene_type
fn next(&self)
fn next(&self)
Sets the current scene to the scene returned by Factory::get_next_Scene_type(). The new scene should be representative of progress. @see Factory::get_next_scene_type
fn restart(&self)
fn restart(&self)
Restarts the current scene. Equivalent of disposing current scene and then setScene to current scene again.