少年修仙传客户端代码仓库
client_linchunjie
2019-05-07 fa05ee668b42111c6790846b5a58f7e6503e829f
3280 【2.0】装备养成各界面列表相关规则和显示最好统一
2个文件已修改
28 ■■■■■ 已修改文件
System/EquipGem/EquipGemWin.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipStrengthWin.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipGemWin.cs
@@ -313,11 +313,11 @@
        private void SelectLevelRefresh()
        {
            DisplayEquips();
            if (model.selectLevel != -1)
            {
                var selectEquip = SetDefaultSelect(model.selectLevel);
                m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectEquip));
            }
            //if (model.selectLevel != -1)
            //{
            //    var selectEquip = SetDefaultSelect(model.selectLevel);
            //    //m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectEquip));
            //}
            DisplayGems();
        }
System/EquipGem/EquipStrengthWin.cs
@@ -68,7 +68,7 @@
            m_StopBtn.gameObject.SetActive(false);
            m_AutomaticBtn.gameObject.SetActive(true);
            OpenSelect();//默认选择
            var selectEquip = OpenSelect();//默认选择
            DisplayEquips();
            SetStrengthenedState();
            model.SelectEquipRefresh += SelectEquipRefresh;
@@ -77,7 +77,7 @@
            model.EquipStrengthLvUpdate += EquipStrengthLvUpdate;
            PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
            m_Controller.JumpIndex(GetJumpIndex(model.SelectLevel, model.SelectEquipPlace));
            m_Controller.JumpIndex(GetJumpIndex(model.SelectLevel, model.SelectEquipPlace, selectEquip));
        }
@@ -123,7 +123,7 @@
        }
        #endregion
        int GetJumpIndex(int selectLevel, int selectPlace)
        int GetJumpIndex(int selectLevel, int selectPlace, bool selectEquip)
        {
            var jumpIndex = 0;
            var equipSets = equipModel.GetAllEquipSets();
@@ -140,6 +140,10 @@
                }
                if (equipSet.unLocked)
                {
                    if (selectLevel == level && !selectEquip)
                    {
                        return jumpIndex;
                    }
                    jumpIndex++;
                    if (model.SelectLevel == level)
                    {
@@ -350,7 +354,7 @@
            }
        }
        private void OpenSelect()
        private bool OpenSelect()
        {
            model.SelectLevel = -1;
            model.SelectEquipPlace = -1;
@@ -360,7 +364,7 @@
                model.SelectLevel = model.jumpEquipPosition.x;
                model.SelectEquipPlace = model.jumpEquipPosition.y;
                model.jumpEquipPosition = Int2.zero;
                return;
                return true;
            }
            var equipSets = equipModel.GetAllEquipSets();
@@ -375,7 +379,7 @@
                    {
                        model.SelectLevel = equipSet;
                        model.SelectEquipPlace = place;
                        return;
                        return true;
                    }
                }
            }
@@ -396,6 +400,7 @@
                    if (model.SelectLevel == level)
                    {
                        var places = model.equipPlaces;
                        places.Sort(EquipCompare);
                        foreach (var place in places)
                        {
                            if (model.SelectEquipPlace == -1)
@@ -406,6 +411,7 @@
                    }
                }
            }
            return false;
        }
        private bool StrengtheBool()