Trait primitives::prelude::SceneManager [−][src]
pub trait SceneManager {
fn scene(&self) -> Box<dyn EngineScene>;
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 [Scene] 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>
fn scene(&self) -> Box<dyn EngineScene>
The currently active scene. Use as a runtime property and not as an initialization property.
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
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