[−][src]Struct keeshond::scene::Scene
A world in which Entities, Components, and ThinkerSystems/DrawerSystems reside.
Methods
impl Scene
[src]
pub fn new() -> Scene
[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<T: Component + 'static>(&mut self) -> bool
[src]
pub fn add_component<T: Component + 'static>(
&mut self,
entity: &Entity,
component: T
) -> bool
[src]
&mut self,
entity: &Entity,
component: T
) -> bool
pub fn remove_component<T: 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 entity_count(&self) -> usize
[src]
Returns the number of Entities in the scene
pub fn add_thinker_system(&mut self, system: Box<dyn ThinkerSystem>)
[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
pub 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.
pub fn draw(
&mut self,
drawing: &mut Box<dyn DrawControl>,
transform: &Mat3,
interpolation: f32
)
[src]
&mut self,
drawing: &mut Box<dyn DrawControl>,
transform: &Mat3,
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.
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
U: FromSample<T>,
fn to_sample_(self) -> U
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
T: FromSample<S> + ToSample<S>,
impl<T> Erased for T
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,