Show / Hide Table of Contents

Class Wait

Represents an instruction to pause for a specified duration.

Inheritance
object
UpdateComponent
InstructionBase
Wait
AnimatedValue
Implements
IComponent
Inherited Members
InstructionBase.Repeat()
InstructionBase.OnFinished(IScreenObject)
InstructionBase.OnRepeating()
InstructionBase.OnStarted()
InstructionBase.RemoveOnFinished
InstructionBase.IsFinished
InstructionBase.RepeatCount
InstructionBase.Started
InstructionBase.Finished
InstructionBase.Repeating
UpdateComponent.OnAdded(IScreenObject)
UpdateComponent.OnRemoved(IScreenObject)
UpdateComponent.SortOrder
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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
InstructionBase.Reset()
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.

Overrides
InstructionBase.Update(IScreenObject, TimeSpan)

Implements

IComponent

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX