What problem does it solve?
Provides a consistent, reusable damage and health architecture to avoid duplicated health logic, inconsistent resistance calculations, and fragile death handling across players, enemies, and destructible objects.
Core Features & Use Cases
- Interface-driven design: IDamageable interface and DamageInfo/DamageResult structs standardize how all entities receive and report damage.
- Damage types & resistances: Built-in enums and DamageResistances allow Physical, Elemental, Poison, Holy/Dark, and True damage handling with configurable resistances.
- Reusable components & events: HealthComponent and DamageDealer templates include healing, criticals, death, revive, and health-change events for UI/VFX integration and predictable gameplay behavior.
- Use Case: Ideal for Unity projects implementing player/enemy health, elemental weaknesses, DOT effects, and reactive UI when health changes.
Quick Start
Add the HealthComponent to an enemy GameObject, set MaxHealth and resistances in the inspector, and call TakeDamage with a DamageInfo from your DamageDealer.