Пример #1
0
    // Use this for initialization
    void Start()
    {
        CQuark.AppDomain.Initialize(true, true, true);
        string text = LoadMgr.LoadFromStreaming(m_blockFilePath);

        CQuark.CQ_Compiler.CompileOneFile(m_blockFilePath, text);
    }
Пример #2
0
    // 这个函数展示了如何执行一个文件(作为函数块)
    void ExecuteFile()
    {
        CQuarkBlock block = new CQuarkBlock();

        string text = LoadMgr.LoadFromStreaming(m_blockFilePath);
        object obj  = block.Execute(text);

        Debug.Log("result = " + obj);
    }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        CQuark.AppDomain.Reset();
        CQuark.AppDomain.RegisterMethod((eDelay)Wait);
        CQuark.AppDomain.RegisterType(typeof(Debug), "Debug");
        string text = LoadMgr.LoadFromStreaming(m_blockFilePath);

        CQuark.AppDomain.BuildFile(m_blockFilePath, text);
    }
Пример #4
0
    void Start()
    {
        CQuark.AppDomain.Initialize(false, true, true);
//        InitAppDomain.RegisterOriType();
//        CQuark.AppDomain.RegisterType (typeof(System.DateTime),"DateTime");
//		CQuark.AppDomain.RegisterType (typeof(System.DayOfWeek),"DayOfWeek");
        string text = LoadMgr.LoadFromStreaming(m_blockFilePath);

        CQuark.CQ_Compiler.CompileOneFile(m_blockFilePath, text);
    }
Пример #5
0
    void Start()
    {
        CQuark.AppDomain.Reset();
        InitAppDomain.RegisterUnityType();
        //CQuark.AppDomain.RegisterType (typeof(System.DateTime),"DateTime");


        string text = LoadMgr.LoadFromStreaming(m_blockFilePath);

        CQuark.AppDomain.BuildFile(m_blockFilePath, text);
    }
Пример #6
0
    // 这个函数展示了如何执行一个文件(作为函数块)
    void ExecuteFile()
    {
        CQuarkParagraph block = new CQuarkParagraph();

        block.SetValue("HP1", 200);
        block.SetValue("HP2", 300);

        string text = LoadMgr.LoadFromStreaming(m_blockFilePath);

        CQuark.CQ_Value obj = block.Execute(text);
        Debug.Log("result = " + obj);
    }
Пример #7
0
    void ExecuteFile()
    {
        string text = LoadMgr.LoadFromStreaming(m_blockFilePath);

        StartCoroutine(script.StartCoroutine(text, this));
    }