| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_storeModel.RefreshBuyShopLimitEvent += UpdateStore;
|
| | |
|
| | | storeFuncEnables.Clear();
|
| | | shoplist = m_storeModel.TryGetStoreDatas(StoreFunc.XBEquipStore);
|
| | | if (shoplist.Count > 0)
|
| | | {
|
| | | storeFuncEnables.Add(StoreFunc.XBEquipStore);
|
| | | }
|
| | | shoplist = m_storeModel.TryGetStoreDatas(StoreFunc.XBRuneStore);
|
| | | if (shoplist.Count > 0)
|
| | | {
|
| | | storeFuncEnables.Add(StoreFunc.XBRuneStore);
|
| | | }
|
| | | shoplist = m_storeModel.TryGetStoreDatas(StoreFunc.XBToolStore);
|
| | | if (shoplist.Count > 0)
|
| | | {
|
| | | storeFuncEnables.Add(StoreFunc.XBToolStore);
|
| | | }
|
| | | shoplist = m_storeModel.TryGetStoreDatas(StoreFunc.XBRuneStore);
|
| | | if (shoplist.Count > 0)
|
| | | {
|
| | | storeFuncEnables.Add(StoreFunc.XBRuneStore);
|
| | | }
|
| | |
|
| | | equipToggle.gameObject.SetActive(storeFuncEnables.Contains(StoreFunc.XBEquipStore));
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | m_storeModel.RefreshBuyShopLimitEvent -= UpdateStore;
|
| | | m_storeModel.RefreshTCBPlayerDataEvent -= RefreshXBScore;
|
| | | }
|
| | | protected override void OnAfterClose()
|
| | |
| | | if (refreshType != PlayerDataType.CDBPlayerRefresh_TreasureScore) return;
|
| | |
|
| | | soreValueText.text = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(25));
|
| | | |
| | | }
|
| | |
|
| | | private void UpdateStore()
|
| | | {
|
| | | CreateShopCell();
|
| | | }
|
| | |
|
| | | private void OnClickToolToggle(bool isOn)
|
| | |
| | | private void CreateShopCell()
|
| | | {
|
| | | shopCtrl.Refresh();
|
| | | shoplist = m_storeModel.TryGetStoreDatas(m_storeModel.storeFuncType);
|
| | | List<StoreModel.StoreData> resultList = new List<StoreModel.StoreData>();
|
| | | shoplist.Clear();
|
| | | resultList = m_storeModel.TryGetStoreDatas(m_storeModel.storeFuncType);
|
| | |
|
| | | //隐藏已售罄物品
|
| | | int remainCnt = 0;
|
| | | foreach(var item in resultList)
|
| | | {
|
| | | if (!_storeModel.TryGetIsSellOut(item.storeConfig, out remainCnt))
|
| | | {
|
| | | shoplist.Add(item);
|
| | | }
|
| | | }
|
| | | if (shoplist.Count > 0)
|
| | | {
|
| | | int i = 0;
|