示例#1
0
 public void InitSignSystem(SCPlayerCheckInInfoResp res)
 {
     if (res == null)
     {
         GetSignInData();
     }
     else
     {
         m_data = res;
         GameEvents.UIEvents.UI_SignIn_Event.OnSignIn.SafeInvoke();
     }
 }
示例#2
0
        public void OnResponse(object obj)
        {
            if (obj is SCPlayerCheckInInfoResp)
            {
                SCPlayerCheckInInfoResp res = (SCPlayerCheckInInfoResp)obj;
                if (res == null || res.Status == 1)
                {
                    GameEvents.UIEvents.UI_Bonus_Pop_View_Event.Tell_OnShow.SafeInvoke();
                    return;
                }

                m_cache.Enqueue(res);

                GameEvents.UIEvents.UI_Bonus_Pop_View_Event.Tell_OnCache.SafeInvoke(EUNM_BONUS_POP_VIEW_TYPE.E_DAILY_SIGN);
                OnDispose();
                //FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_SIGNIN);
                //param.Param = res;
                //EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
            }
        }
示例#3
0
        private void OnResponse(object obj)
        {
            if (obj is SCPlayerCheckInInfoResp)
            {
                SCPlayerCheckInInfoResp res = (SCPlayerCheckInInfoResp)obj;
                if (res == null)
                {
                    EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_SIGNIN);
                    return;
                }
                m_data = res;
                GameEvents.UIEvents.UI_SignIn_Event.OnSignIn.SafeInvoke();
            }
            else if (obj is SCPlayerCheckInResp)
            {
                SCPlayerCheckInResp res = (SCPlayerCheckInResp)obj;
                if (res.Result == 1)
                {
                    SignInItemTable curItem = GetCurrentReward();
                    if (curItem != null)
                    {
                        //放在礼物展示页面,统一加入背包
                        GlobalInfo.MY_PLAYER_INFO.AddSingleBagInfo(curItem.id, curItem.count);

                        GameEvents.UIEvents.UI_GameEntry_Event.Listen_OnCombinePropCollected.SafeInvoke();

                        SCDropResp dropRes  = new SCDropResp();
                        DropInfo   dropInfo = new DropInfo();
                        dropInfo.PropId = curItem.id;
                        dropInfo.Count  = curItem.count;
                        dropRes.DropInfos.Add(dropInfo);
                        FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_GIFTRESULT);
                        param.Param = dropRes;
                        EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
                    }
                }
                EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_SIGNIN);
            }
        }