PredicateInstruction Class
Definition
Section titled “Definition”Instruction that waits until the code callback returns true.
public class PredicateInstruction : InstructionBase, IComponentInheritance object → UpdateComponent → InstructionBase
Implements IComponent
Constructors
Section titled “Constructors”PredicateInstruction(Func<bool>)
Section titled “PredicateInstruction(Func<bool>)”Creates a new instruction with the specified callback.
public PredicateInstruction(Func<bool> callback)Parameters
Section titled “Parameters”callback Func<bool>
The code invoked by this instruction. Return true to set IsFinished.
Properties
Section titled “Properties”Friendly ID to help track what this code instruction was created from since it cannot be fully serialized.
public string ID { 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.
SetCallback(Func<bool>)
Section titled “SetCallback(Func<bool>)”Sets the callback used by the instruction.
public void SetCallback(Func<bool> callback)Parameters
Section titled “Parameters”callback Func<bool>
The code invoked by this instruction. Return true to set IsFinished.