Struct specs::EntityBuilder
[−]
[src]
pub struct EntityBuilder<'a, C = ()>(_, _)
where
C: 'a + PartialEq + Eq + Hash;
Helper builder for entities.
Methods
impl<'a, C> EntityBuilder<'a, C> where
C: 'a + PartialEq + Eq + Hash,
[src]
C: 'a + PartialEq + Eq + Hash,
fn new(e: Entity, w: &'a World<C>) -> Self
Starts a new entity builder for a given Entity
.
fn with_w_comp_id<T: Component>(
self,
comp_id: C,
value: T
) -> EntityBuilder<'a, C>
self,
comp_id: C,
value: T
) -> EntityBuilder<'a, C>
Adds a Component
value to the new Entity
.
fn build(self) -> Entity
Finishes entity construction.
impl<'a> EntityBuilder<'a, ()>
[src]
fn with<T: Component>(self, value: T) -> EntityBuilder<'a>
Adds a Component
value to the new Entity
.