EntityTreeTimer
A one-shot RefCounted timer created by EntityTree.CreateTimer.
This is not an Entity: it needs neither AddChild nor QueueFree. The tree advances time, emits Timeout and removes the timer from its wait list. Keeping a reference does not turn it into a repeating Timer.
CreateTimer defaults processAlways to true, allowing completion while Paused. Pass false for a pausable gameplay wait. processInPhysics and ignoreTimeScale are separate parameters rather than synonyms for processAlways. Setting TimeLeft after completion does not re-register the object in the tree wait list.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties1
TimeLeftProperty
public double TimeLeft { get; set; }Remaining time for the one-shot wait. Changing it after completion does not add the timer back to the tree queue.
Methods2
GetTimeLeftdouble
public double GetTimeLeft();Returns the current remaining time clamped to a minimum of zero, like TimeLeft. Reading does not start a new wait.
doubleRemaining seconds, at least 0.
SetTimeLeftvoid
public void SetTimeLeft(double time);Replaces the remaining time on the existing object. If still queued by the tree, affects the next update. After Timeout it neither requeues the object nor creates another cycle. Use CreateTimer for a new wait.
| Name | Type | Default |
|---|---|---|
time | double | — |
timeNew finite remaining time in seconds. A negative value reads as 0; the tree processes queued expiry, not the setter synchronously.
Signals and events1
TimeoutEvent
public event Action Timeout;Single automatic expiry of a wait created by CreateTimer. No arguments. After delivery the tree removes the timer from its queue; retaining the object does not make it repeat.