| | |
| | | m_StopBtn.gameObject.SetActive(false);
|
| | | m_AutomaticBtn.gameObject.SetActive(true);
|
| | |
|
| | | OpenSelect();//默认选择 |
| | | var selectEquip = OpenSelect();//默认选择 |
| | | DisplayEquips();
|
| | | SetStrengthenedState();
|
| | | model.SelectEquipRefresh += SelectEquipRefresh;
|
| | |
| | | model.EquipStrengthLvUpdate += EquipStrengthLvUpdate;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | |
|
| | | m_Controller.JumpIndex(GetJumpIndex(model.SelectLevel, model.SelectEquipPlace));
|
| | | m_Controller.JumpIndex(GetJumpIndex(model.SelectLevel, model.SelectEquipPlace, selectEquip));
|
| | | }
|
| | |
|
| | |
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | int GetJumpIndex(int selectLevel, int selectPlace)
|
| | | int GetJumpIndex(int selectLevel, int selectPlace, bool selectEquip)
|
| | | {
|
| | | var jumpIndex = 0;
|
| | | var equipSets = equipModel.GetAllEquipSets();
|
| | |
| | | }
|
| | | if (equipSet.unLocked)
|
| | | {
|
| | | if (selectLevel == level && !selectEquip)
|
| | | {
|
| | | return jumpIndex;
|
| | | }
|
| | | jumpIndex++;
|
| | | if (model.SelectLevel == level)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OpenSelect()
|
| | | private bool OpenSelect()
|
| | | {
|
| | | model.SelectLevel = -1;
|
| | | model.SelectEquipPlace = -1;
|
| | |
| | | model.SelectLevel = model.jumpEquipPosition.x;
|
| | | model.SelectEquipPlace = model.jumpEquipPosition.y;
|
| | | model.jumpEquipPosition = Int2.zero;
|
| | | return;
|
| | | return true;
|
| | | }
|
| | |
|
| | | var equipSets = equipModel.GetAllEquipSets();
|
| | |
| | | {
|
| | | model.SelectLevel = equipSet;
|
| | | model.SelectEquipPlace = place;
|
| | | return;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | if (model.SelectLevel == level)
|
| | | {
|
| | | var places = model.equipPlaces;
|
| | | places.Sort(EquipCompare);
|
| | | foreach (var place in places)
|
| | | {
|
| | | if (model.SelectEquipPlace == -1)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private bool StrengtheBool()
|