[][src]Struct dragon::ecs::world::WorldState

pub struct WorldState {
    pub entity_store: RefCell<HashMap<u32, Entity>>,
    pub entity_manager: RefCell<EntityManager>,
    pub component_store: ComponentStore,
    pub component_manager: RefCell<ComponentManager>,
    pub system_store: RefCell<BTreeMap<String, Box<dyn System>>>,
    pub active_camera: Cell<u32>,
}

Fields

entity_store: RefCell<HashMap<u32, Entity>>entity_manager: RefCell<EntityManager>component_store: ComponentStorecomponent_manager: RefCell<ComponentManager>system_store: RefCell<BTreeMap<String, Box<dyn System>>>active_camera: Cell<u32>

Methods

impl WorldState[src]

pub fn new() -> Rc<Self>[src]

pub fn register_component<C: 'static + Component>(&self) -> u32[src]

pub fn register_system<S: 'static + System>(&self, name: &str, system: S)[src]

pub fn tick(&self)[src]

pub fn create_entity(&self) -> u32[src]

pub fn bind_component<C: 'static + Component>(
    &self,
    entity_id: u32,
    component: C
) -> bool
[src]

pub fn get_component_id<C: 'static + Component>(&self) -> Option<u32>[src]

pub fn switch_camera(&self, camera: u32)[src]

Auto Trait Implementations

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>,