Пример #1
0
 /// <summary>
 /// 请求背包信息回调
 /// </summary>
 /// <param name="obj"></param>
 void PlayerPropRequestCallBack(object obj)
 {
     if (obj is SCPlayerPropResponse)
     {
         SCPlayerPropResponse msg_prop_Res = obj as SCPlayerPropResponse;
         if (msg_prop_Res.ReponseStatus == null || msg_prop_Res.ReponseStatus.Code == 0)
         {
             m_curPropData    = BagHelper.getPropData(msg_prop_Res.PlayerProps);
             m_recentPropData = BagHelper.getPropData(msg_prop_Res.RecentProps);
             if (m_page_toggle[(int)m_CurrentBagType].Checked)
             {
                 changePageType((int)m_CurrentBagType, true);
             }
             else
             {
                 m_page_toggle[(int)m_CurrentBagType].Checked = true;
             }
         }
     }
     else if (obj is SCPlayerPropRecentResposne)
     {
         SCPlayerPropRecentResposne msg_recentProp_Res = obj as SCPlayerPropRecentResposne;
         if (msg_recentProp_Res.ReponseStatus == null || msg_recentProp_Res.ReponseStatus.Code == 0)
         {
             m_needClearRecently = true;
         }
     }
 }
Пример #2
0
 void RefreshProps()
 {
     m_curPropData    = BagHelper.getPropData(GlobalInfo.MY_PLAYER_INFO.Bag_infos);
     m_recentPropData = BagHelper.getPropData(GlobalInfo.MY_PLAYER_INFO.Recent_Prop_infos);
     if (m_page_toggle[(int)m_CurrentBagType].Checked)
     {
         changePageType((int)m_CurrentBagType, true);
     }
     else
     {
         m_page_toggle[(int)m_CurrentBagType].Checked = true;
     }
 }
Пример #3
0
        void ChangePage(bool value, int i)
        {
            if (value)
            {
                m_arrow_obj[(int)m_CurrentBagType].SetActive(true);
                m_arrowLab_obj[(int)m_CurrentBagType].SetActive(true);
                this.m_oriLab_obj[(int)m_CurrentBagType].SetActive(false);
                //m_page_tween[(int)m_CurrentBagType].PlayForward();
                m_pageTog_lab[(int)m_CurrentBagType].color = m_destColor;
                List <PropData> tempPropData = new List <PropData>();
                m_propInfo_panel.RecentlyInfoEnable = (m_CurrentBagType != BagTypeEnum.Recently);
                if (m_CurrentBagType == BagTypeEnum.Recently)
                {
                    tempPropData = m_recentPropData;
#if Test
                    SCPlayerPropRecentResposne scRes = new SCPlayerPropRecentResposne();
                    PlayerPropRequestCallBack(scRes);
#else
                    CSPlayerPropRecentRequest msg_recentProp = new CSPlayerPropRecentRequest();

#if !NETWORK_SYNC || UNITY_EDITOR
                    GameEvents.NetWorkEvents.SendAsyncMsg.SafeInvoke(msg_recentProp);
#else
                    GameEvents.NetWorkEvents.SendMsg.SafeInvoke(msg_recentProp);
#endif
#endif
                }
                else
                {
                    if (m_needClearRecently)
                    {
                        m_needClearRecently = false;
                        m_recentPropData.Clear();
                        GlobalInfo.MY_PLAYER_INFO.ClearRecentPropInfo();
                    }
                    tempPropData = m_curPropData;
                }
                List <PropData> confProp = BagHelper.getPropForPage(m_CurrentBagType, tempPropData);
                ReflashBag(confProp, 0);
            }
            else
            {
                m_arrowLab_obj[i].SetActive(false);
                m_arrow_obj[i].SetActive(false);
                this.m_oriLab_obj[i].SetActive(true);
                //m_page_tween[i].PlayBackward();
                m_pageTog_lab[i].color = m_oriColor;
            }
        }
Пример #4
0
 IEnumerable <PropData> GetExhibitInBag()
 {
     return(BagHelper.getExhibitData(GlobalInfo.MY_PLAYER_INFO.Bag_infos));
 }