public ScriptObject Execute() { Reset(); int iInstruction = 0; while (iInstruction < m_InstructionCount) { m_scriptInstruction = m_scriptExecutable[iInstruction++]; ExecuteInstruction(); if (IsExecuted) break; } return m_returnObject; }
//添加一条指令 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; }