Struct WaitForFrames
A coroutine yield instruction that waits for a specified number of Gravitas simulation frames.
public readonly struct WaitForFrames : ILockedYieldInstruction, IEnumerator, IDisposable
- Implements
- Inherited Members
Remarks
Uses a checked deadline in the context's current clock lifetime. Reading an instruction after context reset or disposal throws; reads never consume frames.
Constructors
WaitForFrames(GravitasWorldContext, long)
Creates an instruction that waits for a nonnegative number of simulation frames.
public WaitForFrames(GravitasWorldContext context, long numberOfFrames)
Parameters
contextGravitasWorldContextnumberOfFrameslong
Properties
Context
Gets the deterministic world context that owns this instruction's clock.
public GravitasWorldContext Context { get; }
Property Value
Current
public object? Current { get; }
Property Value
KeepWaiting
Indicates if coroutine should be kept suspended.
public bool KeepWaiting { get; }
Property Value
Methods
Dispose()
public void Dispose()
MoveNext()
public bool MoveNext()
Returns
Reset()
public void Reset()