public void UpdateConsoleOnSnap() //every time a block is snapped, the console is updated with code/text { Block2TextConsoleManager.instance.ClearConsole(); curInstruction = StartCodeBlock.instance.GetMyIArgument() as StandAloneInstruction; while (curInstruction != null) { Block2TextConsoleManager.instance.AddLine(curInstruction?.DescriptiveInstructionToString()); curInstruction = curInstruction.GetNextInstruction(); } }
protected override string GetNestedInstructionsAsString() { string result = ""; StandAloneInstruction currInstruction = GetNestedInstruction(); while (currInstruction != null) { result += "\n\t" + currInstruction.DescriptiveInstructionToString().Replace("\n\t", "\n\t\t"); //add nested instructions with accumulated tabbing currInstruction = currInstruction.GetNextInstruction(); } return(result); }