Skip to content

🛡️ Shields — Internal

📦 Folder Overview

This folder contains internal helper types used by the built-in shield system.

These are not part of the public API and should not be depended on by gameplay code.


🎯 Purpose

Internal shield utilities exist to:

  • Support shield selection and composition
  • Keep built-in implementations clean
  • Avoid exposing implementation details

🧩 What Lives Here

This folder contains:

  • Internal plumbing for shields
  • Helper logic for selection and chaining

It does not contain:

  • Public extension seams
  • Stable integration surfaces

🧩 Components

IShieldChainLike

Internal marker interface used to identify:

  • Chain-style shield components
  • Composite shield implementations

Notes:

  • Not intended for public use
  • Used by internal selection logic

ShieldSelector

Internal helper for resolving which shield to use.

Responsibilities:

  • Selects an IShield using precedence
  • Ensures only valid components are returned

Resolution order:

  1. Explicit provider (if valid)
  2. Chain-like shield on the same GameObject
  3. First local IShield
  4. Chain-like shield in children
  5. First child IShield

Behaviour:

  • Returns only active and enabled components
  • Uses scene-safe resolution
  • Supports fallback discovery

Editor support:

  • May emit warnings when multiple local shields exist
  • May warn when no chain is present

⚠️ Important Notes

Boundaries

Do not:

  • Depend on these types in gameplay code
  • Treat these as extension points
  • Build systems on top of these helpers

If similar behaviour is needed publicly, it belongs in abstractions.


🧠 Usage Guidance

  • Treat this folder as implementation detail
  • Use abstractions and built-in shields for integration
  • Expect internal behaviour to change over time

🚫 Not for Production Use

This folder is not intended as a gameplay integration surface.


  • Shields (Abstractions)
  • Shields (Builtins)
  • Health System