Enemies can be tagged as moving randomly, but it's very subtle.
This commit is contained in:
parent
222b39c403
commit
d6916b675e
4 changed files with 11 additions and 3 deletions
|
@ -192,11 +192,15 @@ DinkyECS::Entity place_combatant(DinkyECS::World &world, Map &game_map, std::str
|
|||
auto enemy = world.entity();
|
||||
auto enemy_data = config.enemies[name];
|
||||
world.set<Position>(enemy, {game_map.place_entity(in_room)});
|
||||
world.set<Motion>(enemy, {0,0});
|
||||
|
||||
if(enemy_data.contains("components")) {
|
||||
components::configure(world, enemy, enemy_data);
|
||||
}
|
||||
|
||||
if(!world.has<Motion>(enemy)) {
|
||||
world.set<Motion>(enemy, {0,0});
|
||||
}
|
||||
|
||||
return enemy;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue