Struct dces::entity::EntityComponentManager[][src]

pub struct EntityComponentManager {
    pub entities: HashMap<Entity, HashMap<TypeId, Box<Any>>>,
}

The EntityComponentManager represents the main entity and component storage.

Fields

The entities with its components.

Methods

impl EntityComponentManager
[src]

Create sa new entity component manager.

Register a new entity.

Removes a entity from the manager.

Register a component for the given entity.

Register a component_box for the given entity.

Returns a refernce of a component of type C from the given entity. If the entity does not exists or it dosen't have a component of type C NotFound will be returned.

Returns a mutable refernce of a component of type C from the given entity. If the entity does not exists or it dosen't have a component of type C NotFound will be returned.

Trait Implementations

impl Default for EntityComponentManager
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations