コード例 #1
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            is_fast_buy = false;

            if (null != param)
            {
                is_fast_buy = (bool)param;
            }
            MainPanelInGameUILogic.Show();


            //MessageHandler.RegisterMessageHandler(MessageDefine.MarkeBuyResponse, OnResponse);
            MessageHandler.RegisterMessageHandler(MessageDefine.MarketResponse, OnResponse);
            m_close_btn.AddClickCallBack(btnClose);

            if (!ShopHelper.IsShopDataAvaliable(cate))
            {
                requestData();
            }
            else
            {
                ShopPropData crashdata = ShopHelper.getShopData(cate);
                InitData(crashdata);
            }
        }
コード例 #2
0
        public static void btnTransPanel(string panelName)
        {
            if (panelName.Equals(UIDefine.UI_MAIL))
            {
                EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_MAIL);
            }

            else if (panelName.Equals(UIDefine.UI_BAG))
            {
                //CSPlayerPropRequest msg_prop = new CSPlayerPropRequest();
                //GameEvents.NetWorkEvents.SendHalfSyncMsg.SafeInvoke(msg_prop);

                //EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_BAG);
                EngineCoreEvents.UIEvent.ShowUIByOther.SafeInvoke(UIDefine.UI_BAG, UIDefine.UI_GAMEENTRY);
            }
#if OFFICER_SYS
            else if (panelName.Equals(UIDefine.UI_POLICE))
            {
                EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_POLICE);
            }
#endif
            else if (panelName.Equals(UIDefine.UI_EVENT_INGAME_ENTRY))
            {
                CSEventDropInfoRequest req = new CSEventDropInfoRequest();

#if TEST
                req.EventId = 2;
#endif

#if !NETWORK_SYNC || UNITY_EDITOR
                GameEvents.NetWorkEvents.SendAsyncMsg.SafeInvoke(req);
#else
                GameEvents.NetWorkEvents.SendMsg.SafeInvoke(req);
#endif
            }
            else if (panelName.Equals(UIDefine.UI_SHOP))
            {
                if (ShopHelper.IsShopDataAvaliable(Category.Common))
                {
                    ShopHelper.OpenShop(Category.Common);
                }
                else
                {
                    MessageHandler.RegisterMessageHandler(MessageDefine.MarketResponse, GameEntryHelper.TransPanel);

                    MarketRequest req = new MarketRequest();
                    req.Category = Category.Common;

                    GameEvents.NetWorkEvents.SendAsyncMsg.SafeInvoke(req);
                }
            }
            else if (panelName.Equals(UIDefine.UI_SCENETALK))
            {
                TalkUIHelper.OnStartTalk(3);
            }
            else if (panelName.Equals(UIDefine.UI_SLOTS))
            {
                EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_ACTIVITY);
            }
            else if (panelName.Equals(UIDefine.UI_ACHIEVEMENT))
            {
                EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_ACHIEVEMENT);
            }
            else if (panelName.Equals(UIDefine.UI_FRIEND))
            {
                EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_FRIEND);
            }
            else if (panelName == UIDefine.UI_CHAPTER)
            {
                EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_CHAPTER);
            }
            else if (panelName.Equals(UIDefine.UI_COMBINE))
            {
                EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_COMBINE);
            }
        }