diff --git a/src/systems/collisions.rs b/src/systems/collisions.rs deleted file mode 100644 index d71c46a..0000000 --- a/src/systems/collisions.rs +++ /dev/null @@ -1,19 +0,0 @@ -use crate::prelude::*; - -#[system] -#[read_component(Point)] -#[read_component(Player)] -#[read_component(Enemy)] -pub fn collisions(ecs: &mut SubWorld, commands: &mut CommandBuffer) { - let mut player_pos = Point::zero(); - let mut players = <&Point>::query().filter(component::()); - players.iter(ecs).for_each(|pos| player_pos = *pos); - - let mut enemies = <(Entity, &Point)>::query().filter(component::()); - enemies - .iter(ecs) - .filter(|(_, pos)| **pos == player_pos) - .for_each(|(entity, _)| { - commands.remove(*entity); - }); -} diff --git a/src/systems/mod.rs b/src/systems/mod.rs index 4542f1b..3a09969 100644 --- a/src/systems/mod.rs +++ b/src/systems/mod.rs @@ -1,5 +1,4 @@ use crate::prelude::*; -mod collisions; mod end_turn; mod entity_render; mod hud; @@ -23,8 +22,6 @@ pub fn player_build_scheduler() -> Schedule { Schedule::builder() .add_system(movement::movement_system()) .flush() - .add_system(collisions::collisions_system()) - .flush() .add_system(map_render::map_render_system()) .add_system(entity_render::entity_render_system()) .add_system(hud::hud_system()) @@ -37,8 +34,6 @@ pub fn monster_build_scheduler() -> Schedule { .flush() .add_system(movement::movement_system()) .flush() - .add_system(collisions::collisions_system()) - .flush() .add_system(map_render::map_render_system()) .add_system(entity_render::entity_render_system()) .add_system(hud::hud_system())