Trait keeshond::scene::BaseScene [−][src]
pub trait BaseScene {
fn think(&mut self, game: &mut GameControl);
fn draw(
&mut self,
resources: &DataMultistore,
drawing: &mut Box<dyn DrawControl>,
transform: &DrawTransform,
interpolation: f32
);
fn start(&mut self, game: &mut GameControl) -> bool;
fn end(&mut self, game: &mut GameControl) -> bool;
fn entity_count(&self) -> usize;
fn component_count(&self) -> usize;
}
Expand description
A base trait for scenes that can be run from within the gameloop
Required methods
fn think(&mut self, game: &mut GameControl)
fn think(&mut self, game: &mut GameControl)
Runs the think logic. Ideally, processes all the ThinkerSystems in this scene.
fn draw(
&mut self,
resources: &DataMultistore,
drawing: &mut Box<dyn DrawControl>,
transform: &DrawTransform,
interpolation: f32
)
fn draw(
&mut self,
resources: &DataMultistore,
drawing: &mut Box<dyn DrawControl>,
transform: &DrawTransform,
interpolation: f32
)
Runs the draw logic. Ideally, processes all the DrawerSystems in this scene.
fn start(&mut self, game: &mut GameControl) -> bool
fn start(&mut self, game: &mut GameControl) -> bool
Called to run initialization logic. Ideally, calls ThinkerSystem::start() on all the ThinkerSystems in this scene.
fn end(&mut self, game: &mut GameControl) -> bool
fn end(&mut self, game: &mut GameControl) -> bool
Called to run deinitialization logic. Ideally, calls ThinkerSystem::end() on all the ThinkerSystems in this scene.
fn entity_count(&self) -> usize
fn entity_count(&self) -> usize
Returns the number of Entities in the scene
fn component_count(&self) -> usize
fn component_count(&self) -> usize
Returns the number of Components in the scene