| | |
| | | protected override void OnPreOpen()
|
| | | {
|
| | |
|
| | | var selectRedpoint = SetDefaultSelect(0);
|
| | | var selectEquip = SetDefaultSelect(0);
|
| | |
|
| | | Display();
|
| | |
|
| | | m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectRedpoint));
|
| | | m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectEquip));
|
| | |
|
| | | model.selectEquipRefresh += SelectEquipRefresh;
|
| | | model.selectLevelRefresh += SelectLevelRefresh;
|
| | |
| | |
|
| | | bool SetDefaultSelect(int level)
|
| | | {
|
| | | if (!model.jumpEquipPosition.Equals(Int2.zero))
|
| | | {
|
| | | model.selectLevel = model.jumpEquipPosition.x;
|
| | | model.selectEquipPlace = model.jumpEquipPosition.y;
|
| | | model.jumpEquipPosition = Int2.zero;
|
| | | return true;
|
| | | }
|
| | |
|
| | | if (level == 0)
|
| | | {
|
| | | var equipSets = equipModel.GetAllEquipSets();
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | int GetJumpIndex(int selectLevel, int selectPlace, bool selectRedpoint)
|
| | | int GetJumpIndex(int selectLevel, int selectPlace, bool selectEquip)
|
| | | {
|
| | | var jumpIndex = 0;
|
| | | var equipSets = equipModel.GetAllEquipSets();
|
| | |
| | | var slotCount = model.GetUnlockEquipSlotCount(level);
|
| | | if (slotCount > 0)
|
| | | {
|
| | | if (selectLevel == level && !selectRedpoint)
|
| | | if (selectLevel == level && !selectEquip)
|
| | | {
|
| | | return jumpIndex;
|
| | | }
|
| | |
| | | DisplayEquips();
|
| | | if (model.selectLevel != -1)
|
| | | {
|
| | | var selectRedpoint = SetDefaultSelect(model.selectLevel);
|
| | | m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectRedpoint));
|
| | | var selectEquip = SetDefaultSelect(model.selectLevel);
|
| | | m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectEquip));
|
| | | DisplayGems();
|
| | | }
|
| | | }
|