[−][src]Struct dces::world::World
The World
struct represents the main interface of the library. It used
as storage of entities, components and systems.
Methods
impl<T> World<T> where
T: EntityContainer,
[src]
impl<T> World<T> where
T: EntityContainer,
pub fn new() -> World<VecEntityContainer> | [src] |
Creates a new world the a vector based entity container.
pub fn from_container(entity_container: T) -> Self | [src] |
Creates a new world from the given container.
pub fn entity_container(&mut self) -> &mut T | [src] |
Returns a mutable reference of the entity container.
pub fn create_entity(&mut self) -> EntityBuilder<T> | [src] |
Creates a new entity and returns a returns an EntityBuilder
.
pub fn remove_entity(&mut self, entity: Entity) | [src] |
Deletes the given entity
.
pub fn register_init_system( | [src] |
Registers the init system.
pub fn register_cleanup_system( | [src] |
Registers the cleanup system.
pub fn create_system( | [src] |
Creates a new entity system and returns a returns an EntitySystemBuilder
.
pub fn remove_system(&mut self, system_id: u32) | [src] |
Removes the given entity
.
pub fn entity_component_manager(&mut self) -> &mut EntityComponentManager | [src] |
Borrows mutable the entity component manager.
pub fn run(&mut self) | [src] |
Run all systems of the world.
Trait Implementations
impl<T: Default> Default for World<T> where
T: EntityContainer,
[src]
impl<T: Default> Default for World<T> where
T: EntityContainer,
impl<T> Send for World<T> where
T: EntityContainer,
[src]
impl<T> Send for World<T> where
T: EntityContainer,
impl<T> Drop for World<T> where
T: EntityContainer,
[src]
impl<T> Drop for World<T> where
T: EntityContainer,
Auto Trait Implementations
Blanket Implementations
impl<T> Component for T where
T: Any,
[src]
impl<T> Component for T where
T: Any,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,