Esempio n. 1
0
    /// <summary>
    /// Compile the specified filename.
    /// </summary>
    /// <param name='filename'>
    /// Filename.
    /// </param>
    public void CompileInternalCode(string filename)
    {
        ByteCodes btcodes = CompileInternalCode();

        // Save as ByteCode File Resources.
        SaveByteCodesToFile(filename, btcodes.GetCode());
    }
Esempio n. 2
0
    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();
    }
Esempio n. 3
0
    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();
    }
//	private SerializedProperty soundDataProp = null;

    static private void CompileAndSaveAsBinaryFile(string fileName, ScenarioNode scenario)
    {
        ByteCodes btcodes = scenario.Compile();

        ViNode.SaveByteCodesToFile(fileName, btcodes.GetCode());
    }