예제 #1
0
 public override void OnHide()
 {
     base.OnHide();
     MainPanelInGameUILogic.Hide();
     this.m_btnClose.RemoveClickCallBack(ClosePanel);
     MessageHandler.UnRegisterMessageHandler(MessageDefine.SCPlayerPropResponse, PlayerPropRequestCallBack);
     MessageHandler.UnRegisterMessageHandler(MessageDefine.SCPlayerPropRecentResposne, PlayerPropRequestCallBack);
     GameEvents.UIEvents.UI_Bag_Event.OnPropCost  -= BagCost;
     GameEvents.UIEvents.UI_Bag_Event.OnItemClick -= OnItemClick;
     m_CurrentBagType    = BagTypeEnum.Total;
     m_LastBagType       = BagTypeEnum.None;
     m_curPropData       = null;
     m_recentPropData    = null;
     m_needClearRecently = false;
 }
예제 #2
0
 void changePageType(int i, bool value)
 {
     if (value)
     {
         if (BagTypeEnum.None != m_LastBagType)
         {
             EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, EngineCommonAudioKey.table_change.ToString());
         }
         m_CurrentBagType = (BagTypeEnum)i;
         if (m_LastBagType == m_CurrentBagType)
         {
             return;
         }
         m_LastBagType = m_CurrentBagType;
     }
     ChangePage(value, i);
 }
예제 #3
0
        public static List <PropData> getPropForPage(BagTypeEnum bagType, List <PropData> propData)
        {
            List <PropData> allProp = new List <PropData>();

            switch (bagType)
            {
            case BagTypeEnum.Total:
                allProp = sortPropForType(propData);
                break;

            case BagTypeEnum.Recently:
                allProp = sortPropForType(propData);
                break;

            case BagTypeEnum.Energy:
                allProp = getPropForType(PropType.EnergyProp, propData);
                break;

            case BagTypeEnum.Prop:
                allProp = getPropForType(PropType.FunctionProp, propData);
                break;

            case BagTypeEnum.Pieces:
                allProp = getPropForType(PropType.PiecesProp, propData);
                break;

            case BagTypeEnum.GiftBox:
                allProp = getPropForType(PropType.GiftBoxProp, propData);
                break;

            case BagTypeEnum.Else:
                allProp = getPropForType(PropType.NormalProp, propData);
                break;

            default:
                break;
            }
            return(allProp);
        }
예제 #4
0
        void BagCost(long id)
        {
            m_LastBagType = BagTypeEnum.None;

            RefreshProps();
        }