Struct dces::entity::EntityBuilder [−][src]
pub struct EntityBuilder<'a, T> where
T: EntityContainer + 'a, { pub entity: Entity, pub entity_component_manager: &'a mut EntityComponentManager, pub entity_container: &'a mut T, }
The entity builder is used to create an entity with components.
Fields
entity: Entity
The created entity.
entity_component_manager: &'a mut EntityComponentManager
Reference to the entity component manager, used to add compoments to the entity.
entity_container: &'a mut T
Methods
impl<'a, T> EntityBuilder<'a, T> where
T: EntityContainer,
[src]
impl<'a, T> EntityBuilder<'a, T> where
T: EntityContainer,
pub fn with<C: Component>(self, component: C) -> Self
[src]
pub fn with<C: Component>(self, component: C) -> Self
Adds a component of type C
to the entity.
pub fn with_box(self, component_box: ComponentBox) -> Self
[src]
pub fn with_box(self, component_box: ComponentBox) -> Self
Adds a component box to the entity.
pub fn build(self) -> Entity
[src]
pub fn build(self) -> Entity
Finishing the creation of the entity.
Auto Trait Implementations
impl<'a, T> !Send for EntityBuilder<'a, T>
impl<'a, T> !Send for EntityBuilder<'a, T>
impl<'a, T> !Sync for EntityBuilder<'a, T>
impl<'a, T> !Sync for EntityBuilder<'a, T>