Skip to content

ConcurrentInstructions Class

Runs one or more instructions at the same time. This instruction completes when all added instructions have finished.

C#
public class ConcurrentInstructions : InstructionBase, IComponent

Inheritance objectUpdateComponentInstructionBase

Implements IComponent

ConcurrentInstructions(IEnumerable<InstructionBase>)

Section titled “ConcurrentInstructions(IEnumerable<InstructionBase>)”

Creates a new instruction that runs the provided instructions concurrently.

C#
public ConcurrentInstructions(IEnumerable<InstructionBase> instructions)

instructions IEnumerable<InstructionBase>
The instructions

The instructions to run concurrently.

C#
public IEnumerable<InstructionBase> Instructions { 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.

Repeats the current instruction. Decrements the RepeatCount value (if applicable), and raises the Repeating event. This method should be overridden in derived classes to customize how the object is reset for a repeat.

C#
public override void Repeat()

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.