|
|
|
@ -35,8 +35,10 @@ void System::enemy_pathing(DinkyECS::World &world, Map &game_map, Player &player |
|
|
|
|
void System::init_positions(DinkyECS::World &world) { |
|
|
|
|
auto &collider = world.get_the<spatial_map>(); |
|
|
|
|
|
|
|
|
|
world.query<Position>([&](const auto &ent, auto &pos) { |
|
|
|
|
collider.insert(pos.location, ent); |
|
|
|
|
world.query<Position, Combat>([&](const auto &ent, auto &pos, auto &combat) { |
|
|
|
|
if(!combat.dead) { |
|
|
|
|
collider.insert(pos.location, ent); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|