Skip to content

Wait Class

Represents an instruction to pause for a specified duration.

C#
public class Wait : InstructionBase, IComponent

Inheritance objectUpdateComponentInstructionBase

Implements IComponent

Creates a new wait timer with the specified duration.

C#
public Wait(TimeSpan duration)

duration TimeSpan
How long this instruction waits until it signals IsFinished.

Creates a new wait timer with a 1-second delay.

C#
public Wait()

How much time has passed.

C#
protected TimeSpan CountedTime

The duration of the wait.

C#
public TimeSpan Duration { get; set; }

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.

C#
public override void Update(IScreenObject componentHost, TimeSpan delta)

componentHost IScreenObject
The object that hosts this instruction.

delta TimeSpan
The time that has elapsed since this method was last called.

Resets the Done flag.

C#
public override void Reset()

On the base class, resets the IsFinished to false. Override this method to reset the derived class’ counters and status flags for the instruction.