Merge branch 'FashionDress' of http://192.168.0.87:10010/r/snxxz_scripts into FashionDress
| | |
| | |
|
| | | public void SetDisplay(int star,int curStar)
|
| | | {
|
| | | int curFashionId = fashionModel.viewFashionDressId;
|
| | | FashionDress fashionDress = null;
|
| | | fashionModel.TryGetFashionDress(curFashionId,out fashionDress);
|
| | | int minStar = 1;
|
| | | int maxStar = 3;
|
| | | int maxStar = fashionDress.maxLevel;
|
| | |
|
| | | if(star == curStar
|
| | | && curStar < maxStar)
|
| | |
| | |
|
| | | if (star == curStar)
|
| | | {
|
| | | starDesText.text = StringUtility.Contact("升至",minStar, "星时获得属性(已获得)");
|
| | | starDesText.text = StringUtility.Contact("升至",star, "星时获得属性(已获得)");
|
| | | }
|
| | | else
|
| | | {
|
| | | starDesText.text = StringUtility.Contact("升至", minStar, "星时获得属性");
|
| | | starDesText.text = StringUtility.Contact("升至", star, "星时获得属性");
|
| | | }
|
| | |
|
| | | int curFashionId = fashionModel.viewFashionDressId;
|
| | | Dictionary<int, int> attrDict = null;
|
| | | fashionModel.TryGetFashionDressProperty(curFashionId,star,out attrDict);
|
| | | if(attrDict != null)
|
| | |
| | | var guid = decomposeGuids[index];
|
| | | FashionDecomposeModel.DecomposeItem decomposeItem = null;
|
| | | decomposeModel.TryGetDecomposeItem(guid,out decomposeItem);
|
| | | itemBeh.SetDisplay(decomposeItem.itemModel);
|
| | | itemBeh.SetDisplay(decomposeItem.itemModel,decomposeItem.isSelect);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | [SerializeField] CommonItemBaisc itemBaisc;
|
| | | [SerializeField] GameObject selectObj;
|
| | |
|
| | | public void SetDisplay(ItemModel itemModel)
|
| | | public void SetDisplay(ItemModel itemModel,bool _isSelect = false)
|
| | | {
|
| | | if (itemModel == null)
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | itemBaisc.gameObject.SetActive(true);
|
| | | selectObj.SetActive(_isSelect);
|
| | | var decomposeModel = FashionDecomposeModel.Instance;
|
| | | itemBaisc.Init(itemModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | |
| | | if (isItem)
|
| | | {
|
| | | decomposeItem.SetIsSelect(_isSelect);
|
| | | if(UpdateDecomposeExpEvent != null)
|
| | | {
|
| | | UpdateDecomposeExpEvent();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | itemModel = _model;
|
| | | if(itemModel.chinItemModel.Effect1 == 243)
|
| | | {
|
| | | decomposeExp = itemModel.chinItemModel.EffectValueB1;
|
| | | decomposeExp = itemModel.chinItemModel.EffectValueB1 * itemModel.itemInfo.ItemCount;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | model.cabinetRefresh += UpdateCabinetLv;
|
| | | model.cabinetRefresh += UpdateCabinetInfo;
|
| | | FashionDecomposeModel.Instance.UpdateDecomposeExpEvent += UpdateGetExp;
|
| | | SetDisplay();
|
| | | }
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.cabinetRefresh += UpdateCabinetLv;
|
| | | model.cabinetRefresh -= UpdateCabinetInfo;
|
| | | FashionDecomposeModel.Instance.UpdateDecomposeExpEvent -= UpdateGetExp;
|
| | | }
|
| | | protected override void OnAfterClose()
|
| | |
| | | UpdateCabinetLv();
|
| | | }
|
| | |
|
| | | private void UpdateCabinetInfo()
|
| | | {
|
| | | FashionDecomposeModel.Instance.GetDecomposeItem();
|
| | | UpdateCabinetLv();
|
| | | lineCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void CreateLineCell()
|
| | | {
|
| | | int line = initGrid / 5;
|