コード例 #1
0
ファイル: Game.cs プロジェクト: 565204473/UnityEliminate
    void complete()
    {
        if (LGameConfig.GetInstance().isShowFps)
        {
            LFPSView.Show();
        }

        if (!LGameConfig.GetInstance().isDebug) //生产环境
        {
            if (LGameConfig.GetInstance().isHotFix)
            {
                GameObject canvas    = GameObject.Find("Canvas");
                Text       lab_unzip = null;
                if (canvas.transform.Find("prog"))
                {
                    canvas.transform.Find("prog").gameObject.SetActive(true);
                    lab_unzip = canvas.transform.Find("prog/lab_unzip").GetComponent <Text>();
                }

                GameObject obj = new GameObject();
                obj.name = "ResUpdate";
                LResUpdate resUpdate = obj.AddComponent <LResUpdate> ();
                resUpdate.onUnzipProgressHandler = (int step) => {
                    if (lab_unzip)
                    {
                        lab_unzip.text = step.ToString();
                    }
                    Debug.Log(" unzip " + step);
                };
                resUpdate.onCompleteHandler = () => {
                    Destroy(obj);
                    LLoadBundle.GetInstance().LoadAllBundles(new string[] { "@lua.ab", "@luaconfig.ab" }, () =>
                    {
                        _l.start("main");
                    });
                };
                resUpdate.checkUpdate();
            }
            else
            {
                LLoadBundle.GetInstance().LoadAllBundles(new string[] { "@lua.ab", "@luaconfig.ab" }, () =>
                {
                    _l.start("main");
                });
            }
        }
        else //PC端开发
        {
            _l.start("main");
        }
    }
コード例 #2
0
ファイル: Game.cs プロジェクト: memsyi/uLui
    void complete()
    {
        LFPSView.Show();

        if (!LGameConfig.GetInstance().isDebug) //生产环境
        {
            GameObject obj = new GameObject();
            obj.name = "ResUpdate";
            LResUpdate resUpdate = obj.AddComponent <LResUpdate>();
            resUpdate.onCompleteHandler = () =>
            {
                Destroy(obj);
                _l.start("main");
            };
            resUpdate.checkUpdate();
        }
        else
        {
            _l.start("main");
        }
    }
コード例 #3
0
ファイル: Game.cs プロジェクト: chenjun818/TestShoot
    void complete()
    {
        if (LGameConfig.GetInstance().isShowFps)
        {
            LFPSView.Show();
        }

        if (!LGameConfig.GetInstance().isDebug) //生产环境
        {
            if (LGameConfig.GetInstance().isHotFix)
            {
                GameObject obj = new GameObject();
                obj.name = "ResUpdate";
                LResUpdate resUpdate = obj.AddComponent <LResUpdate> ();
                resUpdate.onCompleteHandler = () => {
                    Destroy(obj);
                    LLoadBundle.GetInstance().LoadAllBundles(new string[] { "@lua.ab" }, () =>
                    {
                        _l.start("main");
                    });
                };
                resUpdate.checkUpdate();
            }
            else
            {
                LLoadBundle.GetInstance().LoadAllBundles(new string[] { "@lua.ab" }, () =>
                {
                    _l.start("main");
                });
            }
        }
        else //PC端开发
        {
            _l.start("main");
        }
    }