Beispiel #1
0
 public int JumpToLabel(ECJumpToLabel jump)
 {
     for (int i = 0; i < commands.Length; i++)
     {
         if (commands[i] is ECLabel)
         {
             ECLabel label = (ECLabel)commands[i];
             if (jump.CompareToLabel(label))
             {
                 return(i);
             }
         }
     }
     return(index);
 }
Beispiel #2
0
 public bool AdvanceEvent()
 {
     if (index < commands.Length)
     {
         commands[index].Execute();
         if (commands[index] is ECJumpToLabel)
         {
             ECJumpToLabel jump = (ECJumpToLabel)commands[index];
             if (jump.returnValue)
             {
                 index = JumpToLabel(jump);
             }
         }
         index++;
         return(true);
     }
     return(false);
 }