Wait Class
Definition
Section titled “Definition”Represents an instruction to pause for a specified duration.
public class Wait : InstructionBase, IComponentInheritance object → UpdateComponent → InstructionBase
Implements IComponent
Constructors
Section titled “Constructors”Wait(TimeSpan)
Section titled “Wait(TimeSpan)”Creates a new wait timer with the specified duration.
public Wait(TimeSpan duration)Parameters
Section titled “Parameters”duration TimeSpan
How long this instruction waits until it signals IsFinished.
Wait()
Section titled “Wait()”Creates a new wait timer with a 1-second delay.
public Wait()Fields
Section titled “Fields”CountedTime
Section titled “CountedTime”How much time has passed.
protected TimeSpan CountedTimeProperties
Section titled “Properties”Duration
Section titled “Duration”The duration of the wait.
public TimeSpan Duration { get; set; }Methods
Section titled “Methods”Update(IScreenObject, TimeSpan)
Section titled “Update(IScreenObject, TimeSpan)”Executes the instruction. This base class method should be called from derived classes. If the IsFinished property is set to true, will try to repeat if needed and will raise all appropriate events.
public override void Update(IScreenObject componentHost, TimeSpan delta)Parameters
Section titled “Parameters”componentHost IScreenObject
The object that hosts this instruction.
delta TimeSpan
The time that has elapsed since this method was last called.
Reset()
Section titled “Reset()”Resets the Done flag.
public override void Reset()Remarks
Section titled “Remarks”On the base class, resets the IsFinished to false. Override this method to reset the derived class’ counters and status flags for the instruction.