use specs::prelude::*; use super::components::transform::Transform; pub struct GameWorld { pub world: World, } impl GameWorld { pub fn new() -> Self { let mut world = World::new(); world.register::(); GameWorld { world } } pub fn dispatcher(&self) -> specs::AsyncDispatcher<'static, &World> { DispatcherBuilder::new().build_async(&self.world) } }