public override InstructionResult Execute(float dt) { switch (body.Execute(dt)) { case InstructionResult.Done: body = body.Reset(); return InstructionResult.Running; case InstructionResult.DoneAndCreatePowerup: body = body.Reset(); return InstructionResult.RunningAndCreatePowerup; case InstructionResult.Running: return InstructionResult.Running; case InstructionResult.RunningAndCreatePowerup: return InstructionResult.RunningAndCreatePowerup; } return InstructionResult.Running; }
public Repeat(Instruction body) { this.body = body; }
public Semicolon(Instruction A, Instruction B) { this.A = A; this.B = B; }