Basic simple animations where the enemies just move forward.
This commit is contained in:
parent
947ccbe180
commit
80a0f2ba75
9 changed files with 92 additions and 80 deletions
|
@ -131,6 +131,7 @@ void System::death(GameLevel &level, components::ComponentMap& components) {
|
|||
world.remove<Motion>(ent);
|
||||
world.remove<Combat>(ent);
|
||||
world.remove<EnemyConfig>(ent);
|
||||
world.remove<Animation>(ent);
|
||||
|
||||
auto entity_data = config.items["GRAVE_STONE"];
|
||||
components::configure_entity(components, world, ent, entity_data["components"]);
|
||||
|
@ -161,6 +162,11 @@ void System::combat(GameLevel &level) {
|
|||
enemy_combat.attack(player_combat)
|
||||
};
|
||||
|
||||
if(world.has<Animation>(entity)) {
|
||||
auto& animation = world.get<Animation>(entity);
|
||||
animation.current = 0;
|
||||
}
|
||||
|
||||
world.send<Events::GUI>(Events::GUI::COMBAT, entity, result);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue