Beispiel #1
0
    static int set_curRequest(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoadMgr  obj       = (LoadMgr)o;
            Callback arg0      = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (Callback)ToLua.CheckObject(L, 2, typeof(Callback));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(Callback), func) as Callback;
            }

            obj.curRequest = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index curRequest on a nil value" : e.Message));
        }
    }
Beispiel #2
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);
    }
Beispiel #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);
    }
Beispiel #4
0
    // 这个函数展示了如何执行一个文件(作为函数块)
    void ExecuteFile()
    {
        CQuarkBlock block = new CQuarkBlock();

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

        Debug.Log("result = " + obj);
    }
Beispiel #5
0
    override protected void __Clear()
    {
        QuitGame();

        LoadMgr.Clear();

        CCApp.Clear();

        Log.Info("MainEntry Clear", this);
    }
Beispiel #6
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);
    }
Beispiel #7
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);
    }
Beispiel #8
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);
    }
Beispiel #9
0
    //-------∽-★-∽------∽-★-∽--------∽-★-∽数据操作∽-★-∽--------∽-★-∽------∽-★-∽--------//


    void LoadResources()
    {
        List <LoadReq> reqs = new List <LoadReq>();

        reqs.Add(new LoadReqDelay(1));
        //reqs.Add( new LoadReqProg(new ProgData(), OnLoadReqProg));
        //reqs.Add(new LoadReqLevel("SceneEmpty", false));

        LoadReqQueue reqQue = new LoadReqQueue(reqs.ToArray());

        LoadMgr.DoMainLoad(reqQue, LoadResourcesBack, null);
        //LoadMgr.DoMainLoad(reqQue, LoadResourcesBack, POP_ID.LOADING_1);
    }
Beispiel #10
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="params_">
    /// [0] 游戏GameObj根
    /// </param>
    override protected void __Setup(params object[] params_)
    {
        base.__Setup();

        GameObject root = params_[0] as GameObject;

        Log.Info("MainEntry Setup", this);

        CCApp.resMgr   = new ResMgr();
        CCApp.soundMgr = new SoundMgr(root);
        CCApp.Setup(root);

        LoadMgr.Setup();
    }
Beispiel #11
0
 static int GetLoadMgr(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         LoadMgr o = LuaFramework.LuaHelper.GetLoadMgr();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #12
0
    //-------∽-★-∽------∽-★-∽--------∽-★-∽数据操作∽-★-∽--------∽-★-∽------∽-★-∽--------//


    public void LoadResources()
    {
        //LoadReq[] objs = new LoadReq[0];
        //objs = ArrayUtil.Concat<LoadReq>(objs, DataConfig.GetLoadObjs());//配置表

        List <LoadReq> reqs = new List <LoadReq>();

        reqs.Add(new LoadReqLevel("SceneEmpty", false));
        reqs.Add(new LoadReqDelay(1));

        LoadReqQueue reqQue = new LoadReqQueue(reqs.ToArray());

        LoadMgr.DoMainLoad(reqQue, LoadResourcesBack, POP_ID.LOADING_1);

        //LoadResourcesBack();
    }
 static int ReplaceScene(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LoadMgr     obj  = (LoadMgr)ToLua.CheckObject(L, 1, typeof(LoadMgr));
         string      arg0 = ToLua.CheckString(L, 2);
         LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
         obj.ReplaceScene(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #14
0
    static int set_fairyGUIPackList(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoadMgr  obj  = (LoadMgr)o;
            string[] arg0 = ToLua.CheckStringArray(L, 2);
            obj.fairyGUIPackList = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fairyGUIPackList on a nil value" : e.Message));
        }
    }
Beispiel #15
0
    static int get_fairyGUIPackList(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoadMgr  obj = (LoadMgr)o;
            string[] ret = obj.fairyGUIPackList;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fairyGUIPackList on a nil value" : e.Message));
        }
    }
Beispiel #16
0
    static int get_requestQueue(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoadMgr obj = (LoadMgr)o;
            System.Collections.Generic.Queue <Callback> ret = obj.requestQueue;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index requestQueue on a nil value" : e.Message));
        }
    }
Beispiel #17
0
    static int get_curRequest(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoadMgr  obj = (LoadMgr)o;
            Callback ret = obj.curRequest;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index curRequest on a nil value" : e.Message));
        }
    }
Beispiel #18
0
    static int set_requestQueue(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoadMgr obj = (LoadMgr)o;
            System.Collections.Generic.Queue <Callback> arg0 = (System.Collections.Generic.Queue <Callback>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.Queue <Callback>));
            obj.requestQueue = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index requestQueue on a nil value" : e.Message));
        }
    }
Beispiel #19
0
    void doCheck(string name)
    {
        //1 ab池子是否已经有了
        bool hasAB = AssetMgr.has(name);

        if (hasAB)
        {
            AssetMgr.addRef(name);
            taskFinish("");
        }
        else
        {
            //如果加载任务里面有此任务 则加回调
            if (LoadMgr.hasTask(name))
            {
                LoadMgr.addHandler(name, taskFinish);
            }
            else
            {
                string resPath = Path.Combine(Define.abPre, name).ToLower();
                LoadMgr.doLoad(name, resPath, taskFinish);
            }
        }
    }
Beispiel #20
0
 private void Awake()
 {
     _instance           = this;
     Screen.sleepTimeout = SleepTimeout.NeverSleep;
     DontDestroyOnLoad(Gm);
 }
Beispiel #21
0
 void Start()
 {
     Instance = this;
     async    = SceneManager.LoadSceneAsync(1, LoadSceneMode.Single); //加载下一个场景
 }
Beispiel #22
0
    void ExecuteFile()
    {
        string text = LoadMgr.LoadFromStreaming(m_blockFilePath);

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