Very basic attack system.

This commit is contained in:
Zed A. Shaw 2025-02-10 14:06:38 -05:00
parent 6bca6d021e
commit abd843d5ec
5 changed files with 40 additions and 11 deletions

View file

@ -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);