Timer
type Timer
Timer counts down and fires. yield t waits for the next fire or the end; a timer dies with the node of the script that made it.
Timer.Cancel method
func (Timer) Cancel()
Ends the timer without firing.
Timer.Count method
func (Timer) Count() int
Returns how many times the timer has fired.
Timer.Done method
func (Timer) Done() bool
Reports whether the timer ended, was cancelled or is nil.
Timer.Pause method
func (Timer) Pause()
Stops the countdown.
Timer.Ready method
func (Timer) Ready() bool
Reports whether a cooldown can be used.
Timer.Remaining method
func (Timer) Remaining() float
Returns the seconds left until the next fire.
Timer.Repeat method
func (Timer) Repeat(count int) Handle<aego/timer.Timer>
Makes the timer fire n times; -1 repeats until Cancel.
Timer.Restart method
func (Timer) Restart() bool
Starts the countdown again; it does nothing on a one-shot timer that already fired.
Timer.Resume method
func (Timer) Resume()
Continues a paused countdown.
Timer.Unscaled method
func (Timer) Unscaled() Handle<aego/timer.Timer>
Counts real time, also while the game is paused.
Timer.Use method
func (Timer) Use() bool
Takes a ready cooldown and starts its wait; it returns false while the cooldown runs.
Timer.Fired signal
signal Fired(count int)
Runs on every fire of the timer; count is the number of fires so far.