[−][src]Struct orbtk_api::macros::World
The World
struct represents the main interface of the library. It used
as storage of entities, components and systems.
Implementations
impl<E, C, Ctx> World<E, C, Ctx> where
C: ComponentStore,
E: EntityStore,
[src]
C: ComponentStore,
E: EntityStore,
pub fn from_stores(entity_store: E, component_store: C) -> World<E, C, Ctx>
[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, Ctx>)
[src]
Registers the init system.
pub fn register_cleanup_system(
&mut self,
cleanup_system: impl System<E, C, Ctx>
)
[src]
&mut self,
cleanup_system: impl System<E, C, Ctx>
)
Registers the cleanup system.
pub fn create_system(
&mut self,
system: impl System<E, C, Ctx>
) -> SystemStoreBuilder<'_, E, C, Ctx>
[src]
&mut self,
system: impl System<E, C, Ctx>
) -> SystemStoreBuilder<'_, E, C, Ctx>
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.
pub fn run_with_context(&mut self, ctx: &mut Ctx)
[src]
Run all systems of the world and calls run_with_context
of the systems with the given context.
Trait Implementations
impl<E, C, Ctx> Drop for World<E, C, Ctx> where
C: ComponentStore,
E: EntityStore,
[src]
C: ComponentStore,
E: EntityStore,
impl<E, C, Ctx> Send for World<E, C, Ctx> where
C: ComponentStore,
E: EntityStore,
[src]
C: ComponentStore,
E: EntityStore,
Auto Trait Implementations
impl<E, C, Ctx> !RefUnwindSafe for World<E, C, Ctx>
impl<E, C, Ctx> !Sync for World<E, C, Ctx>
impl<E, C, Ctx> Unpin for World<E, C, Ctx> where
C: Unpin,
E: Unpin,
C: Unpin,
E: Unpin,
impl<E, C, Ctx> !UnwindSafe for World<E, C, Ctx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,