Struct tinyecs::World
[−]
[src]
pub struct World { // some fields omitted }
Methods
impl World
fn new() -> World
fn entity_manager<'a>(&'a mut self) -> EntityManager<'a>
Get entity manager for manupalating with entities.
Examples
use tinyecs::*; let mut world = World::new(); { let mut entity_manager = world.entity_manager(); let _entity = entity_manager.create_entity(); // _entity.add_component(); or something }
fn set_system<TSys>(&mut self, system: TSys) where TSys: 'static + System
Add new active system.
fn update(&mut self)
Tick all systems in world. All on_added and on_removed will passed inside this method.