public static LGUIMainUIImpl_NEED_REMOVE getInstance()
 {
     if (instance == null)
     {
         instance = new LGUIMainUIImpl_NEED_REMOVE();
     }
     return(instance);
 }
        private void tryBroadCastEnterGame()
        {
            if (!_mapChangeFlag || !_enterFlag)
            {
                return;
            }
            _mapChangeFlag = false;

            if (!_firstFlag)
            {
                _firstFlag = true;
                //_joinWorld((this.g_mgr.g_netM as muNetCleint).joinWorldInfoInst.m_data);
                //lgGD_Dmis.GetDmis();
                //    (this.g_mgr.g_uiM.getLGUI(UIName.UI_MDLG_SYSTEM) as LGIUISystem).InitSystemSet();
                if (login.instance == null)
                {
                    LGUIMainUIImpl_NEED_REMOVE.getInstance().show_all();
                }
                //this.g_mgr.g_uiM.dispatchEvent(GameEvent.Create(UI_EVENT.UI_OPEN, this, take_va(UIName.UI_MAIN)));
                //  this.g_mgr.g_uiM.dispatchEvent(GameEvent.Create(UI_EVENT.UI_DIPOSE_CREAT, this, null));
                //  (this.g_mgr.g_uiM.getLGUI(UIName.LGUIMission) as LGIUIMission).showMisTrack();
                // (this.g_mgr.g_gameM as muLGClient).lgGD_Award.SendGetAwardInfo();

                dispatchEvent(
                    GameEvent.Create(GAME_EVENT.ON_ENTER_GAME, this, null)
                    );
            }
            else
            {
                //	ogLoading.show();
                dispatchEvent(
                    GameEvent.Create(GAME_EVENT.ON_MAP_CHANGE, this, null)
                    );

                //DoAfterMgr.instacne.addAfterRender(() =>
                //{
                //    MapEffMgr.getInstance().clearAll();

                //});
            }
            debug.Log("!!tryBroadCastEnterGame!! " + debug.count);
        }
 public LGUIMainUIImpl_NEED_REMOVE()
 {
     instance = this;
 }
Example #4
0
        private int m_nSDK_ReloginCount = 0; //因为不知的原因,平台登入取消了,或者是登入错误了,需要重新打开登入界面
        void Update()
        {
            if (m_nSDK_ReloginCount > 0)
            {
                debug.Log("平台的登入取消 " + m_nSDK_ReloginCount);
                m_nSDK_ReloginCount--;

                if (m_nSDK_ReloginCount == 0)
                {
                    debug.Log("平台的登入 " + m_nSDK_ReloginCount);
                    AnyPlotformSDK.Call_Cmd("login");
                }
            }

            if (goUpdate.active == true && curlineScale < 1f)
            {
                if (curlineScale < toLineScale)
                {
                    curlineScale += 0.01f;
                    if (curlineScale > 0.95f)
                    {
                        curlineScale = 1f;
                    }

                    updateline.localScale = new Vector3(curlineScale, 1, 1);

                    if (curlineScale == 1f)
                    {
                        if (canEnter)
                        {
                            changeState(0);
                        }
                        else
                        {
                            canEnter = true;
                        }
                    }
                }
            }

            if (curState == 0)
            {
                return;
            }

            if (curState == 1)
            {
                curState = 2;
            }
            else if (curState == 2)
            {
                aniCam.Play("cam_move");
                imageBg.gameObject.SetActive(true);
                maskColor.a   = 0f;
                imageBg.color = maskColor;
                curState      = 3;
            }
            else if (curState == 3)
            {
                float anilen = aniCam["cam_move"].normalizedTime;
                //  aniCam.
                if (anilen >= 1f)
                {
                    if (_overhandle != null)
                    {
                        _overhandle();
                    }
                    _overhandle = null;
                    curState    = 4;
                    maskColor.a = 1;
                    if (scene != null)
                    {
                        Destroy(scene);
                    }
                    scene = null;
                    if (GRMap.instance != null)
                    {
                        GRMap.instance.refreshLightMap();
                        LGUIMainUIImpl_NEED_REMOVE.getInstance().show_all();
                    }
                }
                else
                {
                    maskColor.a   = anilen;
                    imageBg.color = maskColor;
                }
            }
            else if (curState == 4)
            {
                if (maskColor.a <= 0.1f)
                {
                    curState = 5;
                    InterfaceMgr.ui_Camera_cam.gameObject.SetActive(true);
                    InterfaceMgr.ui_Camera_cam.gameObject.SetActive(true);
                    InterfaceMgr.getInstance().DisposeUI(InterfaceMgr.SERVE_CHOOSE);
                    InterfaceMgr.getInstance().DisposeUI(InterfaceMgr.LOGIN);
                }
                else
                {
                    maskColor.a  -= 0.05f;
                    imageBg.color = maskColor;
                }
            }
        }