Very basic attack system.
This commit is contained in:
parent
6bca6d021e
commit
abd843d5ec
5 changed files with 40 additions and 11 deletions
|
@ -115,6 +115,7 @@ void System::death(GameLevel &level) {
|
|||
world.query<Position, Combat>([&](const auto &ent, auto &position, auto &combat) {
|
||||
// bring out yer dead
|
||||
if(combat.hp <= 0 && !combat.dead) {
|
||||
fmt::println("DIE! entity {} died", ent);
|
||||
combat.dead = true;
|
||||
// take them out of collision map
|
||||
collider.remove(position.location);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue