public override void OnClickUnit() { if (LobbyManager.Inst.popupState == POPUP_STATE.Servant) { SubViewEquipment.Inst.scrollList.MoveScrollSelectedUnit(this.RectTr.anchoredPosition, main_idx); SubViewEquipment.Inst.updateChangeItemInfo(main_idx); } else if (LobbyManager.Inst.popupState == POPUP_STATE.Weapon) { if (!SubViewDeconstruction.checkInst()) { equipmentInfo.scrollList.MoveScrollSelectedUnit(this.RectTr.anchoredPosition, main_idx); equipmentInfo.updateDetailInfo(main_idx); } else { SubViewDeconstruction subview_deconstruction = SubViewDeconstruction.Inst; subview_deconstruction.scrollList.MoveScrollSelectedUnit(this.RectTr.anchoredPosition, main_idx); int item_unit_idx = 0; item_unit_idx = equipmentInfo.EquipmentList[(int)equipmentInfo.GetSelectedMenu()][subview_deconstruction.scrollListData[main_idx]].index; if (subview_deconstruction.checkInsertMax()) { DebugLog.Log(false, "Warning : 분해 슬롯 최대치!"); SimpleErrorPopupVC.Inst.UpdateErrorText("Max Burn List"); } else { if (subview_deconstruction.checkInsertedUnit(item_unit_idx)) { DebugLog.Log(false, "Warning : 이미 분해 슬롯에 등록된 유닛 입니다."); SimpleErrorPopupVC.Inst.UpdateErrorText("Already Listed"); } else { GetComponent <Button>().interactable = false; imageDisable.SetActive(true); SubViewDeconstruction.Inst.InsertUnit(item_unit_idx); } } } } }
public override void OnClickUnit() { if (partyInfo != null) { if (SubViewDeconstruction.checkInst()) { SubViewDeconstruction subview_deconstruction = SubViewDeconstruction.Inst; subview_deconstruction.scrollList.MoveScrollSelectedUnit(this.RectTr.anchoredPosition, main_idx); int chracter_unit_idx = 0; if (subview_deconstruction.GetDeconstructionType() == DECONSTRUCTION_TYPE.SERVANT) { chracter_unit_idx = partyInfo.ServantList[subview_deconstruction.scrollListData[main_idx]].index; } else if (subview_deconstruction.GetDeconstructionType() == DECONSTRUCTION_TYPE.MONSTER) { chracter_unit_idx = partyInfo.MonsterList[subview_deconstruction.scrollListData[main_idx]].index; } if (subview_deconstruction.checkInsertMax()) { DebugLog.Log(false, "Warning : 분해 슬롯 최대치!"); SimpleErrorPopupVC.Inst.UpdateErrorText("Max Burn List"); } else { if (subview_deconstruction.checkInsertedUnit(chracter_unit_idx)) { DebugLog.Log(false, "Warning : 이미 분해 슬롯에 등록된 유닛 입니다."); SimpleErrorPopupVC.Inst.UpdateErrorText("Already Listed"); } else { GetComponent <Button>().interactable = false; imageDisable.SetActive(true); SubViewDeconstruction.Inst.InsertUnit(chracter_unit_idx); } } } else if (SubViewUpgrade.checkInst()) { SubViewUpgrade.Inst.scrollList.MoveScrollSelectedUnit(this.RectTr.anchoredPosition, main_idx); int selected_unit_idx = partyInfo.MonsterList[SubViewUpgrade.Inst.scrollListData[main_idx]].index; SubViewUpgrade.Inst.InsertUnit(selected_unit_idx); } else { partyInfo.scrollList.MoveScrollSelectedUnit(this.RectTr.anchoredPosition, main_idx); if (partyInfo.selectedMenu == PartyInfoVC.menu_type.SERVANT || partyInfo.selectedMenu == PartyInfoVC.menu_type.MONSTER) { partyInfo.updateDetailInfo(getUnitIdx()); } else if (partyInfo.selectedMenu == PartyInfoVC.menu_type.FORMATION) { int chracter_unit_idx = 0; if (partyInfo.currentScrollType == PartyInfoVC.scroll_type.SERVANT_INFO) { chracter_unit_idx = partyInfo.ServantList[main_idx].index; } else if (partyInfo.currentScrollType == PartyInfoVC.scroll_type.MONSTER_INFO) { chracter_unit_idx = partyInfo.MonsterList[main_idx].index; } partyInfo.InsertUnit(chracter_unit_idx); } } } }