Skip to content

RevFramework — Status Effects • UI

Optional, lightweight UI components for visualising active status effects (buffs, debuffs, CC) at runtime.

This folder is presentation-only. The Status Effects system does not depend on it.


Purpose

Provides optional UI components that reflect the state of a StatusEffectController.

  • event-driven for icon lifecycle (apply / remove / expire)
  • frame-updated for visual elements such as timers

Usage Guidance

UI is a read-only layer.

  • the controller owns state
  • UI listens and reflects
  • UI does not drive gameplay behaviour

Use controller events for structure, and read effect state for visuals.


What Lives Here

StatusBuffBar

  • subscribes to controller events
  • spawns and removes icon views
  • tracks stack counts
  • uses a short destroy delay to reduce flicker

StatusIconView

  • displays icon, timer, and optional stack count
  • bound to an IStatusEffect
  • updates each frame based on effect state
  • the stack-count label is a TMP_Text field when TextMeshPro is available, which on Unity 6 is always — TMP ships inside the built-in com.unity.ugui module. Assign it a TextMeshProUGUI. StatusBuffBar builds its own icon views at runtime and wires this for you, so the field only needs assigning on prefabs you author yourself.

StatusIconLibrary

  • maps statusId to sprite, tint, and label
  • provides fallback values when no mapping exists

Folder Overview

  • event-driven UI components
  • frame-updated visual elements
  • ScriptableObject-based icon mapping

Important Notes

  • UI reflects controller state and does not modify it
  • Removing the controller removes the source of truth
  • Destroy delay is used to prevent flicker during refresh or replace
  • UI does not handle authority or gameplay rules

Diagnostics

Common pitfalls:

  • expecting UI to drive behaviour
  • reusing icon instances instead of instantiating
  • assuming refresh events update visuals automatically

Not for Production Use

Display only; the UI never changes status state

  • this folder does not implement gameplay logic
  • this folder does not mutate status state
  • this folder does not define stacking or authority behaviour
  • this folder does not control time systems

  • Core → controller and events
  • Effects → runtime behaviour
  • Abstractions → shared contracts

Mental Model

UI reflects status state.

The controller remains the source of truth.