public void OnClickFormationSlot(int btn_tag) { if (frameScroll.gameObject.activeSelf) { frameScroll.gameObject.SetActive(false); } else { selectedFormationSlot = btn_tag; if (formationSlot[selectedFormationSlot] > 0)//캐릭터가 설정되어있는 슬롯을 눌렀을때 -> 캐릭터 해제 { if (btn_tag <= DEFINE.ServantMaxFormationNum) { if (formationSlot[btn_tag + 5] != 0) { SimpleErrorPopupVC.Inst.UpdateErrorText("THERE IS MONSTER IN FRONT OF SERVANT"); return; } } selectedFormationSlot = -1; frameScroll.gameObject.SetActive(false); DebugLog.Log(false, "Index : " + btn_tag + " / Ex Party Info Index : " + formationSlot[btn_tag] + " / Ex User Party Info Index : " + UserDataManager.Inst.GetUserPartyInfo().formationDataDic[btn_tag].index); formationSlot[btn_tag] = 0; DebugLog.Log(false, "Index : " + btn_tag + " / Now Party Info Index : " + formationSlot[btn_tag] + " / Ex User Party Info Index : " + UserDataManager.Inst.GetUserPartyInfo().formationDataDic[btn_tag].index); formationSlot[btn_tag] = 0; updateFormation(); } else //비어있는 슬롯을 눌렀을때 -> 캐릭터 선택 스크롤 활성화 { selectedFormationSlot = btn_tag; if (btn_tag < 5) { currentScrollType = scroll_type.SERVANT_INFO; } else { currentScrollType = scroll_type.MONSTER_INFO; } frameScroll.gameObject.SetActive(true); resetScroll(); } } }
//좌측 메뉴버튼 클릭 public void OnClickMenuButton(int tag) { if (tag == (int)menu_type.SERVANT) { selectedMenu = menu_type.SERVANT; currentScrollType = scroll_type.SERVANT_INFO; } else if (tag == (int)menu_type.MONSTER) { selectedMenu = menu_type.MONSTER; currentScrollType = scroll_type.MONSTER_INFO; } else if (tag == (int)menu_type.FORMATION) { selectedMenu = menu_type.FORMATION; SetFormation(); //currentScrollType = scroll_type.FORMATION; } updateAllView(); }