Beispiel #1
0
        /// <summary>
        /// 隐藏加载中
        /// </summary>
        public static void HideLoading()
        {
            UIMgr.GetInstance().loading             = false;
            UIMgr.GetInstance().timeOutTime         = 0.0f;
            UIMgr.GetInstance().loadingTimeOutTimer = 0.0f;

            UIMgr.GetInstance().ClosePanel(UIConstant.UIID_GENERAL_LOADING);
        }
Beispiel #2
0
        /// <summary>
        /// 当进入场景的处理器
        /// </summary>
        /// <param name='sender'>
        /// 场景管理器
        /// </param>
        void HandleOnEnterScene(SceneManager_anhui sender)
        {
            UIMgr.HideLoading();
            switch (sender.EnteringScene)
            {
            case ESCENE.MAHJONG_GAME_MAIN_SCENE:
                Load_LobbyPanels();
                //ScaleAnchor();
                OpenUIPanel(UIConstant.UIID_MAHJONG_GAME_MAIN_PANEL);
                break;

            default:
                break;
            }
        }
Beispiel #3
0
        void LateUpdate()
        {
            --delDelayFrame;
            if (delDelayFrame < 0)
            {
                foreach (DictionaryEntry panel in delPanels)
                {
                    if ((GameObject)panel.Value != null)
                    {
                        GameObject.DestroyImmediate(panel.Value as GameObject);
                    }
                }

                delPanels.Clear();
            }

            if (panelIDToOpen != UIConstant.UIID_WRONG_ID)
            {
                DoOpenPanel(panelIDToOpen);
                panelIDToOpen = UIConstant.UIID_WRONG_ID;
            }
            else if (panelIDToClose != UIConstant.UIID_WRONG_ID)
            {
                DoClosePanel(panelIDToClose);
                panelIDToClose = UIConstant.UIID_WRONG_ID;
            }

            if (loading)
            {
                if (timeOutTime > 0.1f)
                {
                    if (Time.realtimeSinceStartup - loadingTimeOutTimer > timeOutTime)
                    {
                        if (OnLoadingTimeOut != null)
                        {
                            OnLoadingTimeOut();
                        }

                        UIMgr.HideLoading();
                    }
                }
            }
        }
Beispiel #4
0
 void Awake()
 {
     instance = this;
     //DontDestroyOnLoad(gameObject);
     UIPanels.Clear();
 }
        /// <summary>
        /// 更新面板
        /// </summary>
        /// <param name="msg"></param>
        public void GetAwardShow(NetMsg.ClientSrp17Info msg)
        {
            if (temp != null)
            {
                StopCoroutine(temp);
            }

            //抢光了,显示红包详细信息
            if (msg == null)
            {
                UpdateRobStatus(2);
            }
            //抢到红包,播放红包领取动画
            else
            {
                UpdateRobStatus(0);
                UIMgr.GetInstance().ShowRedPagePanel.OnSetValueAndNotOpenPanel(16, 1, 2, null, RedPageShowPanel.NowState.Game);
                int RpType = 0;
                switch (msg.byAssetType)
                {
                case 1:
                {
                    RpType = 3;
                }
                break;

                case 2:
                {
                    RpType = 4;
                }
                break;

                case 3:
                {
                    RpType = 1;
                }
                break;

                case 4:
                {
                    RpType = 2;
                }
                break;

                case 5:
                {
                    RpType = 5;
                }
                break;

                case 6:
                {
                    RpType = 0;
                }
                break;
                }

                Debug.LogError("RpType:" + RpType);
                UIMgr.GetInstance().ShowRedPagePanel.DirectOpenRedPagePanel(msg.iAssetNum.ToString(), RpType, "麻将馆福利,抢到就是赚到!");
                gameObject.SetActive(false);
            }
        }