Skip to main content

Class TimeLimitService

A timer service implementation that tracks elapsed time against a configurable time limit. Triggers an event when time runs out and exposes timer-related properties for UI and logic.

public class TimeLimitService : MonoBehaviour, ITimerService, IUnityGameService

Inheritance​

Implements​

Properties​

ElapsedTime​

Total time elapsed since the timer started.

public float ElapsedTime { get; }

Property Value​

float

RemainingTime​

Remaining time in whole seconds.

public int RemainingTime { get; }

Property Value​

int

TimeLimit​

The time limit set for the timer, in seconds.

public float TimeLimit { get; }

Property Value​

float

TimerBlinkThreshold​

Threshold (in seconds) below which the timer may start blinking or visually warning the user.

public float TimerBlinkThreshold { get; }

Property Value​

float

  • Properties
    • ElapsedTime
    • RemainingTime
    • TimeLimit
    • TimerBlinkThreshold