API ReferenceSandbox
public sealed struct Sandbox.TimeUntil
A convenience struct to easily manage a time countdown, based on `Sandbox.Time.Now`. Typical usage would see you assigning to a variable of this type a necessary amount of seconds. Then the struct would return the time countdown, or can be used as a bool i.e.: TimeUntil nextAttack = 10; if ( nextAttack ) { /*Do something*/ }
Related Guides
Broader workflow and conceptual references connected to this API.
Properties
Showing 4 properties
public float Sandbox.TimeUntil.Absolute { get; set; }
Time to which we are counting down to, based on `Sandbox.Time.Now`.
public float Sandbox.TimeUntil.Fraction { get; set; }
The countdown, but as a fraction, i.e. a value from 0 (start of countdown) to 1 (end of countdown)
public float Sandbox.TimeUntil.Passed { get; set; }
Amount of seconds passed since the countdown started.
public float Sandbox.TimeUntil.Relative { get; set; }
The actual countdown, in seconds.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.TimeUntil |