コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (Application.platform == RuntimePlatform.Android && (Input.GetKeyDown(KeyCode.Escape)))
        {
            if (game.GameUser.getInstance().isFunctionSupported("exit"))
            {
                game.GameUser.getInstance().callFuncWithParam("exit");
            }
            else
            {
                MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("ConfirmQuit"), () =>
                {
                    Application.Quit();
                }, false, null, null, "", "", 2000, true);
            }
        }

        AtlasLoader.Instance.Update();
        PlayerDepLoader.Instance.Update();
        EffectDepLoader.Instance.Update();
        AssetInfoMgr.Instance.Update();
        UIAssetMgr.Update();
        PlayerAsseMgr.Update();
        EffectAssetMgr.Update();
        SceneLoader.Instance.Update();
        GuideManager.Instance.Update();
        GlobalInstanceFunction.Instance.Update();
        EventMgr.Instance.Update();
        NetConnection.Instance.Update();
        AssetLoader.Update();
        GameManager.Instance.Update();
        Prebattle.Instance.Update();
        Battle.Instance.Update();
        EffectMgr.Instance.Update();
        VersionManager.Instance.Update();
        ChatSystem.Update();
        BagSystem.instance.UpdateUsetime();
        BabyData.UpdateUsetime();
        EmployeeTaskSystem.instance.Update();
        if ((gameHandler._SdkInitSuccess || GlobalValue.IsDebugMode) && mayPullResFolderName)
        {
            mayPullResFolderName = false;
            //跳过cdn检查
            TransferRate._Inst.Send("Load LoginPanel Begin");
//            UIFactory.Instance.LoadUIPanel("LoginPanel", () =>
//            {
            UIFactory.Instance.OpenUI(GlobalValue.StageName_LoginScene, menuTypes.MAIN);
            TransferRate._Inst.Send("Load LoginPanel End");
//                AssetLoader.LoadAssetBundle("NpcNameLabel", AssetLoader.EAssetType.ASSET_UI, (AssetBundle bundle2, ParamData data2) =>
//                {
//                    nameLabel = bundle2.mainAsset;
//                    mayShowSysNotice = true;
//                }, null, Configure.assetsPathstreaming);
//            });
            //StartCoroutine(PullResFolderName());
        }

        if ((gameHandler._SdkInitSuccess || GlobalValue.IsDebugMode) && mayShowSysNotice)
        {
            TransferRate._Inst.Send("Show System Notice");
            mayShowSysNotice = false;
            //公告时 加载点轻量级资源
            PopText.Instance.Init();
            NpcHeadChat.Instance.Init();
            StartCoroutine(SysNotice());
        }
    }
コード例 #2
0
ファイル: ApplicationEntry.cs プロジェクト: heycayc/mlbb
    // Update is called once per frame
    void Update()
    {
        if (Application.platform == RuntimePlatform.Android && (Input.GetKeyDown(KeyCode.Escape)))
        {
            MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("ConfirmQuit"), () =>
            {
                SDKInterface.Instance.SDKExit();
                //Application.Quit();
            }, false, null, null, "", "", 2000, true);
        }

        AtlasLoader.Instance.Update();
        PlayerDepLoader.Instance.Update();
        EffectDepLoader.Instance.Update();
        AssetInfoMgr.Instance.Update();
        UIAssetMgr.Update();
        PlayerAsseMgr.Update();
        EffectAssetMgr.Update();
        SceneLoader.Instance.Update();
        GuideManager.Instance.Update();
        GlobalInstanceFunction.Instance.Update();
        EventMgr.Instance.Update();
        NetConnection.Instance.Update();
        AssetLoader.Update();
        GameManager.Instance.Update();
        Prebattle.Instance.Update();
        Battle.Instance.Update();
        EffectMgr.Instance.Update();
        VersionManager.Instance.Update();
        ChatSystem.Update();
        BagSystem.instance.UpdateUsetime();
        BabyData.UpdateUsetime();
        EmployeeTaskSystem.instance.Update();

        if (mayShowSysNotice)
        {
            mayShowSysNotice = false;
            //公告时 加载点轻量级资源
            PopText.Instance.Init();
            NpcHeadChat.Instance.Init();
            StartCoroutine(SysNotice());
        }


        //PopText.Instance.Init();
        //NpcHeadChat.Instance.Init();
        //StartCoroutine(SysNotice());


        if (mayPullResFolderName)
        {
            mayPullResFolderName = false;
            //跳过cdn检查
            UIFactory.Instance.LoadUIPanel("LoginPanel", () =>
            {
                UIFactory.Instance.OpenUI(GlobalValue.StageName_LoginScene, menuTypes.MAIN);
                AssetLoader.LoadAssetBundle("NpcNameLabel", AssetLoader.EAssetType.ASSET_UI, (AssetBundle bundle2, ParamData data2) =>
                {
                    nameLabel        = bundle2.mainAsset;
                    mayShowSysNotice = true;
                }, null, Configure.assetsPathstreaming);
            });
            StartCoroutine(PullResFolderName());
            //
        }
    }