2019-01-02 19:22:01 +00:00
|
|
|
pub mod phys;
|
2019-03-04 00:06:01 +00:00
|
|
|
pub mod uid;
|
2019-03-06 13:48:44 +00:00
|
|
|
pub mod util;
|
2019-01-02 19:22:01 +00:00
|
|
|
|
2019-03-04 19:50:26 +00:00
|
|
|
// Reexports
|
|
|
|
pub use uid::{Uid, UidAllocator};
|
|
|
|
|
2019-01-13 20:53:55 +00:00
|
|
|
use specs::World as EcsWorld;
|
2019-01-02 17:23:31 +00:00
|
|
|
|
|
|
|
pub fn register_local_components(ecs_world: &mut EcsWorld) {
|
2019-03-04 19:50:26 +00:00
|
|
|
ecs_world.register::<Uid>();
|
2019-03-05 00:00:11 +00:00
|
|
|
ecs_world.add_resource(UidAllocator::new());
|
2019-03-04 00:06:01 +00:00
|
|
|
|
2019-03-06 13:48:44 +00:00
|
|
|
ecs_world.register::<util::New>();
|
|
|
|
|
2019-01-02 19:22:01 +00:00
|
|
|
ecs_world.register::<phys::Pos>();
|
|
|
|
ecs_world.register::<phys::Vel>();
|
|
|
|
ecs_world.register::<phys::Dir>();
|
2019-03-05 00:00:11 +00:00
|
|
|
ecs_world.register::<phys::UpdateKind>();
|
2019-01-02 17:23:31 +00:00
|
|
|
}
|