Struct specs::EntityBuilder
[−]
[src]
pub struct EntityBuilder<'a> { /* fields omitted */ }The entity builder, allowing to build an entity together with its components.
Methods
impl<'a> EntityBuilder<'a>[src]
fn with<T: Component>(self, c: T) -> Self
Appends a component with the default component id.
Panics
Panics if the component hasn't been register()ed in the
World.
fn with_id<T: Component>(self, c: T, id: usize) -> Self
Appends a component with a component id.
Panics
Panics if the component hasn't been register_with_id()ed in the
World.
fn build(self) -> Entity
Finishes the building and returns the entity.