[−][src]Struct keeshond::scene::Scene
A world in which Entities, Components, and ThinkerSystems/DrawerSystems reside.
Implementations
impl<T: SceneType + 'static> Scene<T>
[src]
pub fn new() -> Self
[src]
Creates a new Scene
pub fn component_control(&self) -> &ComponentControl
[src]
Returns a reference to the control used to access ComponentStores. You normally don't need to call this yourself.
pub fn component_control_mut(&mut self) -> &mut ComponentControl
[src]
Returns a mutable reference to the control used to access ComponentStores. You normally don't need to call this yourself.
pub fn register_component_type<C: Component + 'static>(&mut self) -> bool
[src]
pub fn add_component<C: Component + 'static>(
&mut self,
entity: &Entity,
component: C
) -> bool
[src]
&mut self,
entity: &Entity,
component: C
) -> bool
pub fn remove_component<C: Component + 'static>(
&mut self,
entity: &Entity
) -> bool
[src]
&mut self,
entity: &Entity
) -> bool
pub fn add_entity(&mut self) -> Entity
[src]
Creates a new Entity within the scene, returning its handler.
pub fn remove_entity(&mut self, entity: &Entity) -> bool
[src]
Removes the Entity with the given handle from the scene. Returns true if successful.
pub fn has_entity(&self, entity: &Entity) -> bool
[src]
Returns true if the scene has the given Entity.
pub fn spawn(
&mut self,
spawnable_id: T::SpawnableIdType,
game: &mut GameControl,
x: f64,
y: f64,
args: &[SpawnArg]
)
[src]
&mut self,
spawnable_id: T::SpawnableIdType,
game: &mut GameControl,
x: f64,
y: f64,
args: &[SpawnArg]
)
pub fn add_thinker_system(&mut self, system: Box<dyn ThinkerSystem<T>>)
[src]
Adds the given ThinkerSystem to the scene
pub fn add_drawer_system(&mut self, system: Box<dyn DrawerSystem>)
[src]
Adds the given DrawerSystem to the scene
Trait Implementations
impl<T: SceneType + 'static> BaseScene for Scene<T>
[src]
fn think(&mut self, game: &mut GameControl)
[src]
Processes all the ThinkerSystems in this scene. You normally do not need to call this yourself, as the Gameloop handles this for you.
fn start(&mut self, game: &mut GameControl) -> bool
[src]
Allows all the ThinkerSystems to process their "start of scene" actions. You normally do not need to call this yourself, as the Gameloop handles this for you.
fn end(&mut self, game: &mut GameControl) -> bool
[src]
Allows all the ThinkerSystems to process their "end of scene" actions. You normally do not need to call this yourself, as the Gameloop handles this for you.
fn draw(
&mut self,
drawing: &mut Box<dyn DrawControl>,
transform: &DrawTransform,
interpolation: f32
)
[src]
&mut self,
drawing: &mut Box<dyn DrawControl>,
transform: &DrawTransform,
interpolation: f32
)
Processes all the DrawerSystems in this scene. You normally do not need to call this yourself, as the Gameloop handles this for you.
fn entity_count(&self) -> usize
[src]
Returns the number of Entities in the scene
fn component_count(&self) -> usize
[src]
Returns the number of Components in the scene
Auto Trait Implementations
impl<T> !RefUnwindSafe for Scene<T>
impl<T> !Send for Scene<T>
impl<T> !Sync for Scene<T>
impl<T> Unpin for Scene<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for Scene<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,