Struct calx_ecs::Ecs
[−]
[src]
pub struct Ecs<ST> { /* fields omitted */ }
Generic entity component system container
Needs to be specified with the parametrized Store
type that has struct fields for the actual
components. This can be done with the Ecs!
macro.
Methods
impl<ST: Default + Store> Ecs<ST>
[src]
fn new() -> Ecs<ST>
Construct a new entity component system.
fn make(&mut self) -> Entity
Create a new empty entity.
fn remove(&mut self, e: Entity)
Remove an entity from the system and clear its components.
fn contains(&self, e: Entity) -> bool
Return whether the system contains an entity.
fn iter(&self) -> Iter<Entity>
Iterate through all the active entities.
Trait Implementations
impl<ST> Deref for Ecs<ST>
[src]
type Target = ST
The resulting type after dereferencing
fn deref(&self) -> &ST
The method called to dereference a value
impl<ST> DerefMut for Ecs<ST>
[src]
fn deref_mut(&mut self) -> &mut ST
The method called to mutably dereference a value