[][src]Struct orbtk::World

pub struct World<E, C> where
    C: ComponentStore,
    E: EntityStore
{ /* fields omitted */ }

The World struct represents the main interface of the library. It used as storage of entities, components and systems.

Methods

impl<E, C> World<E, C> where
    C: ComponentStore,
    E: EntityStore
[src]

pub fn from_stores(entity_store: E, component_store: C) -> World<E, C>[src]

Creates a new world from the given container.

pub fn create_entity(&mut self) -> EntityBuilder<E, C>[src]

Creates a new entity and returns a returns an TypeEntityBuilder.

pub fn remove_entity(&mut self, entity: impl Into<Entity>)[src]

Deletes the given entity.

pub fn register_init_system(&mut self, init_system: impl System<E, C>)[src]

Registers the init system.

pub fn register_cleanup_system(&mut self, cleanup_system: impl System<E, C>)[src]

Registers the cleanup system.

pub fn create_system(
    &mut self,
    system: impl System<E, C>
) -> SystemStoreBuilder<E, C>
[src]

Creates a new entity system and returns a returns an SystemStoreBuilder.

pub fn remove_system(&mut self, system_id: u32)[src]

Removes the given entity.

pub fn entity_component_manager(&mut self) -> &mut EntityComponentManager<E, C>[src]

Borrows mutable the entity component manager.

pub fn print_entity(&self, entity: impl Into<Entity>)[src]

Print infos about the given entity.

pub fn run(&mut self)[src]

Run all systems of the world.

Trait Implementations

impl<E, C> Send for World<E, C> where
    C: ComponentStore,
    E: EntityStore
[src]

impl<E, C> Drop for World<E, C> where
    C: ComponentStore,
    E: EntityStore
[src]

Auto Trait Implementations

impl<E, C> !Sync for World<E, C>

impl<E, C> Unpin for World<E, C> where
    C: Unpin,
    E: Unpin

impl<E, C> !UnwindSafe for World<E, C>

impl<E, C> !RefUnwindSafe for World<E, C>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> Component for E where
    E: Any
[src]

impl<T> SetParameter for T