InstructionPlayerInstruction └── InstructionSequence ← you are here ├── Instruction_Combo └── Instruction_PingPong

Fields & Properties

MemberTypeDescription
childsList<PlayerInstruction>Internal serialized list of children. Access read-only via Childrens.
ChildrensIReadOnlyList<PlayerInstruction>Read-only view of the child instruction list.
maxCapacity abstractintMaximum number of children this sequence accepts. The UI enforces this limit.

Abstract Methods — Must Override

MethodDescription
Execute()Instant side-effects before animation. Usually empty for sequences.
Tick(ExecutionContext ctx)Coroutine. For a pure sequence, leave the body empty and call yield break — children are automatically executed by GetExecutionList().

Public Methods

MethodDescription
AddInstruction(PlayerInstruction i)Appends a child to the sequence.
RemoveInstruction(PlayerInstruction i)Removes a child from the sequence.
Insert(int index, PlayerInstruction i)Inserts a child at a specific index.
Validate() overrideReturns false if the child list is empty or any child is invalid.
GetExecutionList(int loop) overrideIterates all children and yields their execution lists in order. This is what makes children run sequentially.

Example

namespace LoopAdventure
{
    [TypeName("MyCombo")]
    public class Instruction_MyCombo : InstructionSequence
    {
        public override string displayName  => "My Combo";
        public override int    maxCapacity  => 3;

        // Children are run automatically via GetExecutionList.
        public override void      Execute() { }
        protected override IEnumerator Tick(ExecutionContext ctx) { yield break; }
    }
}