public void InterpretAndPlay(string scenario) { CheckInstance(); SystemUtility.ClearAllTextBoxMessage(); VM vm = VM.Instance; vm.currentScenarioName = gameObject.name; ViNoToolkit.KAGInterpreter kag = new ViNoToolkit.KAGInterpreter(); List <byte> byteList = kag.Interpret(scenario); ByteCodes btcodes = new ByteCodes(byteList.ToArray()); btcodes.Add(Opcode.END); vm.SetCode(btcodes.GetCode()); vm.Run(); }
public void InterpretAndPlay( string scenario ) { CheckInstance(); SystemUtility.ClearAllTextBoxMessage(); VM vm = VM.Instance; vm.currentScenarioName = gameObject.name; ViNoToolkit.KAGInterpreter kag = new ViNoToolkit.KAGInterpreter(); List<byte> byteList = kag.Interpret( scenario); ByteCodes btcodes = new ByteCodes( byteList.ToArray() ); btcodes.Add( Opcode.END ); vm.SetCode( btcodes.GetCode() ); vm.Run(); }