ConcurrentInstructions Class
Definition
Section titled “Definition”Runs one or more instructions at the same time. This instruction completes when all added instructions have finished.
public class ConcurrentInstructions : InstructionBase, IComponentInheritance object → UpdateComponent → InstructionBase
Implements IComponent
Constructors
Section titled “Constructors”ConcurrentInstructions(IEnumerable<InstructionBase>)
Section titled “ConcurrentInstructions(IEnumerable<InstructionBase>)”Creates a new instruction that runs the provided instructions concurrently.
public ConcurrentInstructions(IEnumerable<InstructionBase> instructions)Parameters
Section titled “Parameters”instructions IEnumerable<InstructionBase>
The instructions
Properties
Section titled “Properties”Instructions
Section titled “Instructions”The instructions to run concurrently.
public IEnumerable<InstructionBase> Instructions { 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.
Repeat()
Section titled “Repeat()”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.
public override void Repeat()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.