protected float FindChainSize(IArgument aIn)
        {
            StandAloneInstruction sai = aIn as StandAloneInstruction;

            if (sai != null)
            {
                return(sai.GetCodeBlock().GetCodeBlockObjectMesh().GetBlockVerticalSize()); // todo maybe make this cleaner?
            }
            return(0);
        }
 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();
     }
 }
Exemple #3
0
        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);
        }