Skip to content

⚔️ Health — Internal / Combat

📦 Folder Overview

This folder contains internal combat-state helpers used by the Health system and related convenience APIs.

These types are not part of the public Health extension surface.


🎯 Purpose

Internal combat helpers exist to:

  • Bridge Health-side events into combat-state components
  • Keep combat-state signalling out of public gameplay contracts
  • Provide minimal plumbing for optional combat-state integration

🧩 What Lives Here

This folder contains:

  • Internal helper code
  • Optional combat-state plumbing
  • Implementation detail used by Health-side integrations

It does not contain:

  • A public combat framework
  • A supported extension seam
  • A gameplay contract

🧩 Components

CombatUtility

Internal helper for interacting with HealthCombatState when present.

Responsibilities:

  • Enter combat on outgoing damage attempts
  • Force combat entry when needed
  • Force combat exit when needed
  • Gracefully no-op if no HealthCombatState exists

Behaviour:

  • EnterOnOutgoingAttempt(GameObject)

  • Asks the target to enter or refresh combat using the component’s own outgoing-damage gate

  • ForceEnterCombat(GameObject, float seconds = -1f)

  • Marks the target in combat directly

  • TryExitCombat(GameObject)

  • Forces an immediate exit

Notes:

  • Works only with the optional HealthCombatState component
  • If that component is absent, all methods safely do nothing

⚠️ Important Notes

Boundaries

Do not:

  • Depend on CombatUtility from gameplay code
  • Treat it as a public combat-state abstraction
  • Build combat systems directly on top of this helper
  • Assume combat-state support is always present

If combat-state behaviour is needed, use the public Unity-facing component:

  • HealthCombatState

🧠 Usage Guidance

  • Treat this folder as implementation detail
  • Keep combat-state integration optional
  • Avoid exposing combat plumbing as part of gameplay contracts

🚫 Not for Production Use

This folder is not intended as a gameplay integration surface.


  • Health Components / Combat
  • Health System
  • Rules Extensions