|
Monad Engine da02fba2
> Undercity Codex_
|
Universal HP sink: damageable + killable game objects. More...
#include <functional>#include "scene/Component.h"
Include dependency graph for HealthComponent.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | mnd::DamageInfo |
| class | mnd::HealthComponent |
Namespaces | |
| namespace | mnd |
Universal HP sink: damageable + killable game objects.
Any GameObject that can take damage (player, goblins, breakables) carries a HealthComponent. The DamageSystem looks for this component on the victim GameObject when applying a DamageEvent. Death emits an OnDeath callback so gameplay code (loot drops, ragdoll, score) can react without coupling to the damage source.
Definition in file HealthComponent.h.