Skip to content

RevFramework — Status Effects • Timing

Default time source implementations for the Status Effects system.

This folder provides concrete runtime helpers that implement the ITimeSource contract defined in Abstractions.


🎯 Purpose

This folder contains runtime time sources used by StatusEffectController.

Time sources define how much time passes between updates.

They are:

  • small
  • stateless
  • replaceable

🧠 Usage Guidance

The Status system does not read Unity time directly.

Instead, the controller queries an ITimeSource, allowing different notions of time:

  • scaled time (Time.deltaTime)
  • unscaled time (Time.unscaledDeltaTime)
  • paused (no ticking)
  • custom time (turn-based or external clocks)

This keeps time handling:

  • explicit
  • testable
  • replaceable

🧩 What Lives Here

ScaledTimeSource

Uses UnityEngine.Time.deltaTime.

  • affected by Time.timeScale
  • suitable for standard gameplay

UnscaledTimeSource

Uses UnityEngine.Time.unscaledDeltaTime.

  • ignores time scale
  • suitable for UI or pause-independent behaviour

PausedTimeSource

Returns 0.

  • prevents ticking
  • durations remain unchanged

📦 Folder Overview

  • concrete ITimeSource implementations
  • controller-consumed time providers
  • no direct update ownership

⚠️ Important Notes

  • Time sources do not drive updates
  • Time sources do not store accumulated time
  • StatusTimeMode.Custom requires a valid ITimeSource
  • Effects are driven by controller time, not Unity time directly

🧪 Diagnostics

Common pitfalls:

  • Assuming time sources trigger updates
  • Using custom mode without providing a source
  • Expecting time sources to manage pause state

🚫 Not for Production Use

  • This folder does not implement controller logic
  • This folder does not execute lifecycle behaviour
  • This folder does not define authority rules

  • Abstractions → ITimeSource
  • Core → controller and ticking
  • System → StatusTimeMode

🧠 Mental Model

Time sources report delta time.

The controller decides how that time is used.