class

PointClickEngine::Core::TimerManager

Inherits Reference < Object

Manager for all game timers

Constructors

new(event_bus : Events::EventBus | Nil = nil)
Source

Instance methods

active_timer_count

Get number of active timers

Source
add_repeating_timer(delay : Float32, callback_code : String | Nil = nil) : String

Add a repeating timer

Source
add_timer(delay : Float32, callback_code : String | Nil = nil) : String

Add a one-shot timer

Source
cancel_all

Cancel all timers

Source
cancel_timer(id : String) : Bool

Cancel a timer by id

Source
event_bus
Source
event_bus=(event_bus : Events::EventBus | Nil)
Source
has_active_timers?

Check if any timers are active

Source
timers
Source
timers=(timers : Array(Timer))
Source
update(dt : Float32)

Update all timers

Source