❤️ Health — Teaching Panels¶
The Teaching folder contains a set of lightweight IMGUI panels used for learning, debugging, and hands-on testing of the Health System directly inside your scenes.
These panels demonstrate how rules, shields, regeneration, combat state, and effects interact in real time.
Each panel is intentionally minimal and code-first — ideal for understanding behaviour, copying patterns, and wiring your own production UI later.
Status: Sample / Teaching UI — intended for development/testing scenes only. Not for shipping.
Define Guard:
REV_HEALTH_PRESENT⚠️ If a Teaching panel is present on a GameObject in a shipped scene, it will be visible and interactive at runtime.
Shipping with Teaching panels attached is a developer error, not a framework bug.
Teaching Panel Categories¶
Health teaching panels are divided into two categories.
HostileConsumer¶
Panels that operate strictly through public APIs and supported extension seams.
These panels verify that the Health system can be used by an external project without internal access.
They act as API verification tools.
Demo¶
Panels designed to demonstrate behaviour interactively.
Demo panels may:
- rebuild shield stacks
- attach rules dynamically
- configure handlers for demonstration
These panels exist for learning and debugging, not API verification.
🧩 Panel Overview¶
| Panel | Category | Focus |
|---|---|---|
| RulesBasicsTagPanel | HostileConsumer | Pre-rule damage flow |
| CritExecuteBuffsPanel | HostileConsumer | Crits, execute, attacker buffs |
| DotHotStacksPanel | HostileConsumer | DOT/HOT stacks |
| RegenIFramesCombatPanel | HostileConsumer | Regen, i-frames, combat state |
| DeathFxHandlersPanel | HostileConsumer | Death pipeline |
| ShieldsPanel | Demo | Shield systems & chaining |
| TeamsFriendlyFirePanel | Demo | Team damage behaviour |
Each panel is self-contained and demonstrates one clear concept.
All panels inherit from TeachablePanelBase, use pure IMGUI, anchor top-left, and toggle with the Backquote (`) key.
🎯 Learning Goals¶
Across all panels you’ll learn to:
- Preview and apply damage using engine-accurate calculations
- Understand rule ordering (pre-rule vs post-rule evaluation)
- Configure and test shield behaviours and chains
- Observe critical hits, execute rules, and buffs
- Manage regeneration, invincibility frames, and combat state
- Apply and inspect DOT/HOT effects and stack logic
- Test team rules and friendly-fire scaling
- Inspect death handling and effect pipelines
💡 Example: Damage Preview vs Apply¶
Teaching panels demonstrate the same call patterns your production code will use:
var preview = health.PreviewDamage(ctx);
if (preview > 0)
{
var result = health.ApplyDamage(ctx);
}
No mock logic.
No demo-only shortcuts.
These panels show exactly what the runtime systems calculate.
🧰 Integration Tips¶
- Teaching panels are IMGUI-based and intended for development scenes only.
- They will run in player builds if left in a scene, but this is considered a developer error rather than a supported runtime feature.
- Safe to keep in dev scenes — they won’t affect runtime systems.
- Copy service calls, result handling, and rule configuration into your own UI.
- Ignore IMGUI/layout code — it’s scaffolding only.
Panels will clearly warn if required references or rules are missing.
🧱 Teaching Folder Layout¶
``` Health/ └─ Teaching/ ├─ Demo/ │ ShieldsPanel.cs │ TeamsFriendlyFirePanel.cs │ ├─ HostileConsumer/ │ CritExecuteBuffsPanel.cs │ DeathFxHandlersPanel.cs │ DotHotStacksPanel.cs │ RegenIFramesCombatPanel.cs │ RulesBasicsTagPanel.cs │ └─ Support/ HealthReasonText.cs
Teaching Support Helpers¶
The Support folder contains small helper utilities used by teaching panels.
Examples include:
HealthReasonText– maps damage rejection reasons to readable teaching text- formatting helpers shared across panels
These helpers exist purely for the teaching layer and are not part of the Health runtime API.
🧠 Quick Review¶
| Attribute | Summary |
|---|---|
| Audience | Developers integrating or exploring the Health system |
| Goal | Teach rule flow, effects, and combat behaviour |
| Style | Code-first, readable, and dependency-light |
| Location | Assets/RevFramework/Runtime/Systems/Health/Teaching/ |
| Safety | Dev-scene focused; must not be shipped with scenes |
| Theme | IMGUI — consistent with all RevFramework teaching panels |
TL;DR¶
The Teaching folder is your in-engine classroom for the Health system.
Use it to explore damage rules, shields, effects, and death handling — then copy the patterns into your own UI.