Ejemplo n.º 1
0
        private void AddProp(SCPlayerUpLevel msg)
        {
            //foreach (var reward in msg.Rewards)
            //{
            //    ConfProp prop = ConfProp.Get(reward.PropId);

            //    if ((int)PROP_TYPE.E_FUNC == prop.type || (int)PROP_TYPE.E_CHIP == prop.type || (int)PROP_TYPE.E_NROMAL == prop.type || (int)PROP_TYPE.E_ENERGE == prop.type)
            //    {
            //        GlobalInfo.MY_PLAYER_INFO.AddSingleBagInfo(reward.PropId, reward.Num);
            //    }
            //}
        }
Ejemplo n.º 2
0
        private void AddProp(SCPlayerUpLevel msg)
        {
            foreach (var reward in msg.Rewards)
            {
                ConfProp prop = ConfProp.Get(reward.PropId);

                if ((int)PROP_TYPE.E_FUNC == prop.type || (int)PROP_TYPE.E_CHIP == prop.type || (int)PROP_TYPE.E_NROMAL == prop.type || (int)PROP_TYPE.E_ENERGE == prop.type)
                {
                    GlobalInfo.MY_PLAYER_INFO.AddSingleBagInfo(reward.PropId, reward.Num);
                }
            }

            GameEvents.UIEvents.UI_GameEntry_Event.Listen_OnCombinePropCollected.SafeInvoke();
        }
Ejemplo n.º 3
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            GameEvents.UIEvents.UI_Bonus_Pop_View_Event.Tell_OnBlock.SafeInvoke(true);

            if (null != param)
            {
                m_data = param as LevelUpData;

                SCPlayerUpLevel msg = (SCPlayerUpLevel)m_data.msg;
                m_view.Visible = true;
                m_view.Refresh(msg);

                this.AddProp(msg);
            }
        }
Ejemplo n.º 4
0
        private void OnLevelUp(object msg)
        {
            Debug.Log("奖励页面下发");
            SCPlayerUpLevel rsp = msg as SCPlayerUpLevel;

            m_level_ups.Enqueue(rsp);

            GameEvents.UIEvents.UI_Bonus_Pop_View_Event.Tell_OnCache.SafeInvoke(EUNM_BONUS_POP_VIEW_TYPE.E_LVL_UP);
            GameEvents.UIEvents.UI_Bonus_Pop_View_Event.Tell_OnShow.SafeInvoke();

            if (null != rsp.PushInfo)
            {
                List <Push_Info> infos = new List <Push_Info>();
                infos.Add(rsp.PushInfo);
                PushGiftManager.Instance.RefreshLvlPush(infos);
                //PushGiftManager.Instance.TurnOn(ENUM_PUSH_GIFT_BLOCK_TYPE.E_LVL);
                PushGiftManager.Instance.Cache(ENUM_PUSH_GIFT_BLOCK_TYPE.E_LVL);

                GameEvents.UIEvents.UI_Bonus_Pop_View_Event.Tell_OnCache.SafeInvoke(EUNM_BONUS_POP_VIEW_TYPE.E_PUSH_GIFT);
            }
        }
Ejemplo n.º 5
0
        public override void OnExecute()
        {
            base.OnExecute();
            SCPlayerUpLevel levelData = new SCPlayerUpLevel();

            levelData.OldLevel = this.oldLevel;
            levelData.NewLevel = this.newLevel;
            //MessageHandler.Call(MessageDefine.SCPlayerUpLevel, levelData);

            LevelUpData data = new LevelUpData()
            {
                msg         = levelData,
                m_click_act = null,
            };

            FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_LEVEL_UP);
            param.Param = data;

            EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
            GlobalInfo.MY_PLAYER_INFO.SetLevel(newLevel);

            OnDestory();
        }
Ejemplo n.º 6
0
        public void Refresh(SCPlayerUpLevel msg_)
        {
            m_data = msg_;

            this.Refresh();
        }