示例#1
0
 public ScriptObject Execute()
 {
     Reset();
     int iInstruction = 0;
     while (iInstruction < m_InstructionCount) {
         m_scriptInstruction = m_scriptExecutable[iInstruction++];
         ExecuteInstruction();
         if (IsExecuted) break;
     }
     return m_returnObject;
 }
示例#2
0
 //添加一条指令
 public void AddScriptInstruction(ScriptInstruction val)
 {
     m_listScriptInstructions.Add(val);
 }
 private ScriptObject Execute(ScriptExecutable executable)
 {
     if (executable == null) return null;
     Reset();
     ScriptInstruction[] scriptInstructions = executable.ScriptInstructions;
     int iInstruction = 0;
     int iInstructionCount = scriptInstructions.Length ;
     while (iInstruction < iInstructionCount) {
         m_scriptInstruction = scriptInstructions[iInstruction++];
         ExecuteInstruction();
         if (IsExecuted) break;
     }
     return m_returnObject;
 }
 //添加一条指令
 public void AddScriptInstruction(ScriptInstruction val)
 {
     m_listScriptInstructions.Add(val);
 }