Class Wait
Represents an instruction to pause for a specified duration.
Implements
Inherited Members
Namespace: SadConsole.Instructions
Assembly: SadConsole.dll
Syntax
public class Wait : InstructionBase, IComponent
Constructors
Wait()
Creates a new wait timer with a 1-second delay.
Declaration
public Wait()
Wait(TimeSpan)
Creates a new wait timer with the specified duration.
Declaration
public Wait(TimeSpan duration)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | duration | How long this instruction waits until it signals IsFinished. |
Fields
CountedTime
How much time has passed.
Declaration
protected TimeSpan CountedTime
Field Value
Type | Description |
---|---|
TimeSpan |
Properties
Duration
The duration of the wait.
Declaration
public TimeSpan Duration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
Reset()
Resets the Done flag.
Declaration
public override void Reset()
Overrides
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.
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.
Declaration
public override void Update(IScreenObject componentHost, TimeSpan delta)
Parameters
Type | Name | Description |
---|---|---|
IScreenObject | componentHost | The object that hosts this instruction. |
TimeSpan | delta | The time that has elapsed since this method was last called. |