Repository navigation
SceneTreeTimer
Home | API by Category | Complete API Index | API Status
| Field | Value |
|---|---|
| Full name | Electron2D.SceneTreeTimer |
| Namespace | Electron2D |
| Kind | class |
| Category | API Scene |
Provides a lightweight one-shot timer processed by a Electron2D.SceneTree.
public sealed class Electron2D.SceneTreeTimerThe owning tree updates the timer after node callbacks in the selected frame lane. The timer is automatically disposed after timeout delivery. Keeping a managed reference does not extend its lifetime. Time advances only from delivered frame deltas; Electron2D.Engine supplies both scaled and original deltas when it drives the tree. The timer has no internal clock.
Inherits: ElectronObject
| Member | Kind | Summary |
|---|---|---|
public event System.Action<Electron2D.SceneTreeTimer> Timeout |
event | Occurs once when the remaining delay reaches zero. |
protected override System.Void Dispose(System.Boolean disposing) |
method | |
protected override System.Collections.Generic.IEnumerable<Electron2D.PropertyDescriptor> GetPropertyDescriptors() |
method | |
protected override System.Void ValidateDisposal() |
method | |
public System.Double TimeLeft { get; set; } |
property | Gets or sets the remaining delay in seconds. |
Kind: event
public event System.Action<Electron2D.SceneTreeTimer> TimeoutOccurs once when the remaining delay reaches zero.
Delivery is synchronous on the tree owner thread after node callbacks and before deferred work. The timer is disposed after the event invocation returns or throws. A handler failure propagates through the owning frame as part of an System.AggregateException.
Kind: method
protected override System.Void Dispose(System.Boolean disposing)Removes the timer from its tree, clears timeout subscribers, and calls the base implementation.
Kind: method
protected override System.Collections.Generic.IEnumerable<Electron2D.PropertyDescriptor> GetPropertyDescriptors()Appends this class's remaining-time and processing-policy descriptors.
Kind: method
protected override System.Void ValidateDisposal()Requires the owner thread while this timer remains owned by a scene tree.
-
T:System.InvalidOperationException: The caller is not the owner thread.
Kind: property
public System.Double TimeLeft { get; set; }Gets or sets the remaining delay in seconds.
Changing the value does not change the timer's selected frame lane or pause policy. Zero expires on the next matching frame.
A finite non-negative duration. It reaches zero before Electron2D.SceneTreeTimer.Timeout is raised.
-
T:System.ArgumentOutOfRangeException: The assigned value is negative, NaN, or infinite. -
T:System.InvalidOperationException: An attached timer is mutated off its tree's owner thread. -
T:System.ObjectDisposedException: The timer is disposing on another thread or has finished disposing.