Skip to content

⚙️ Health — Handlers

📦 Folder Overview

This folder contains optional behaviour components that extend the Health system with lifecycle, gating, and state-management helpers.

Handlers are not required for Health to function.


🎯 Purpose

Handlers provide:

  • Lifecycle hooks (death, revive)
  • Gating and state helpers (invincibility, regeneration)
  • Event-driven reactions around Health

🧩 What Lives Here

Interface-driven Handlers

Consumed by HealthSystem:

  • IInvincibilityHandler
  • IHealthDeathHandler
  • IHealthRegenerator
  • IBeforeDeathHandler

These participate in lifecycle and mutation flow.


Event-driven Handlers

Observers that subscribe to events such as:

  • Died
  • Revived
  • Damaged

These react to outcomes and do not influence core execution.


Provided Components

  • AnimatorDeathHandler — triggers Animator parameters on death/revive
  • ExtraLifeTotemHandler — cancels death and revives (optional one-use)
  • HealthInvincibilityHandler — manages invincibility windows
  • HealthRegenerationHandler — applies regeneration over time
  • HealthDeathEffectHandler — VFX / feedback on death

⚠️ Important Notes

Boundaries

Handlers are not:

  • Core health ownership (HealthSystem)
  • A networking or replication system
  • A replacement for rules
  • Max-health modifier systems

🧠 Usage Guidance

  • Use interface-driven handlers for lifecycle participation
  • Use event-driven handlers for reactions and feedback
  • Prefer public APIs for all interactions
  • Keep handlers small and composable

🚫 Not for Production Use

This folder is optional and may be removed or replaced.


  • Health System
  • Rules
  • Effects
  • Modifiers