public override InstructionReturnValue RunInstruction() { if (!nextInstructionAddedToStack) { Interpreter.instance.AddToInstructionStack(GetNextInstruction()); nextInstructionAddedToStack = true; } EvaluateArgumentsOfInstruction(); if (conditionIsTrue) { Interpreter.instance.AddToInstructionStack(this); SetCurIter(curIter + 1); MyCodeBlock.UpdateText(); return(new InstructionReturnValue(null, GetNestedInstruction())); } return(null); // done with loop }
private void SetCurIter(int num) { curIter = num; MyCodeBlock.UpdateText(); }