| | |
| | | SelectEquipModel selectModel {get { return ModelCenter.Instance.GetModel<SelectEquipModel>(); }}
|
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | playerPack.ItemCntReduceAct += UpdateItemCount;
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | playerPack.ItemCntReduceAct -= UpdateItemCount;
|
| | | }
|
| | |
|
| | | public void SetDisplay(ItemCompoundConfig _itemCompound,NeedMatType _matType,bool isLock,string des = "", int _itemId = 0,int _itemIndex = -1)
|
| | | {
|
| | | this.itemCompound = _itemCompound;
|
| | |
| | | WindowCenter.Instance.Open<SelectItemWin>();
|
| | | }
|
| | |
|
| | | private void UpdateItemCount(PackType type, int index, int id)
|
| | | {
|
| | | if (itemModel == null) return;
|
| | | |
| | | if(itemModel.packType == type |
| | | && itemModel.itemInfo.ItemPlace == index
|
| | | && itemModel.itemId == id)
|
| | | {
|
| | | ClickReduce();
|
| | | }
|
| | | }
|
| | |
|
| | | private void ClickReduce()
|
| | | {
|
| | | if (itemModel == null) return;
|