private void SetData() { //기본세팅 page = 0; //선택지 세팅 CodeBox.ClearList(boxTr); if (answerType == TalkBox.EVENT) { for (int i = 0; i < npc.have_Event.Count; i++) { int num = npc.have_Event[i]; CodeBox.AddChildInParent(boxTr, box).GetComponent <Npc_Talk_Box>().SetBox(transform, num, NpcData.Instance.npcTalk_Event[num]); } } else//키워드 나열 { for (int i = 0; i < NpcData.Instance.npcTalk_Keyword.Length; i++) { if (!NpcData.Instance.npcTalk_Keyword[i].unlock) { continue; } CodeBox.AddChildInParent(boxTr, box).GetComponent <Npc_Talk_Box>().SetBox(transform, i, npc.Used_Keyword_Icon(i)); } } }
public void MakeKnightList() { selectKnighObj.SetActive(true); CodeBox.ClearList(selectKnightListTr); foreach (Knight k in unit.knights) { if (k.teaming == true) { continue; } GameObject obj = CodeBox.AddChildInParent(selectKnightListTr, knightPrefab); obj.GetComponent <WorldKnightPrefab>().SetData(k); } //초기화. selectDayList.SetData(dungeon.GetDungeonProgress(d).SearchP == 100 ? true : false); CodeBox.ClearList(selectView); txrArr.Clear(); Cnt = 0; }
//WorkListController - Click(7) 에서 호출. 귀환 후 public void UpdateDungeonInWorld() { foreach (Transform tr in dungeonPos) { CodeBox.ClearList(tr); } CreateDungeonInWorld(); }
//KightList생성 public void MakeKinghtList(Transform list) { CodeBox.ClearList(list); int index = 0; foreach (Knight k in unit.knights) { GameObject obj = CodeBox.AddChildInParent(list, knightPrefab); obj.GetComponent <KnightPrefab>().SetData(k); } }
//List에 표시되는 파티원들의 모습 public void PartyInfoViewer() { Party p = DungeonData.Instance.dungeon_Progress[index].p; CodeBox.ClearList(partyInfo_ListTr); world.ResetTexture();//<< -- 텍스쳐임 foreach (int kNum in p.k) { GameObject obj = CodeBox.AddChildInParent(partyInfo_ListTr, partyInfo_knight); Knight k = UnitData.Instance.knights[kNum]; obj.GetComponent <KnightInfo_Simple>().SetData(k); obj.GetComponent <KnightInfo_Simple>().SetCharacter(world.TextureFinder(k));//<<-- 텍스쳐 } }
public void SelectDungeon(int _index) { //기본 던전 정보 index = _index; gameObject.SetActive(true); DungeonProgress dp = DungeonData.Instance.dungeon_Progress [index]; dungeon_Name_Text.text = dp.d.name; dungeon_Level_Text.text = index < 2 ? "LV.1" : index < 5 ? "LV.2" : index < 7 ? "LV.3" : "LV.4"; dungoen_SearchPer_Text.text = string.Format("{0}%", dp.SearchP); dungeon_SaturationPer_Text.text = string.Format("{0}%", dp.Saturation); type = DungeonData.Instance.dungeon_Progress[index].eventType; //화면 세팅 /* 0 : none(출전가능한) * 1 : 전투 * 2 : NON Event (그냥 탐색.) * 3 : Choice Event(선택지 이벤트, dp - choice_Event_Type 값 참조) * * n : 자연지형에 의한 선택지 * n : 동료간 대화에 의한 선택지 * n : 기록의 발견(SearchPer 첫달성시) * * 7 : 일정대로 진행 후 귀환함. * 8 : 0의 제외한 이벤트 후 귀환 요청이 가능한 화면 */ for (int i = 0; i < 9; i++) { workTypeObj[i].SetActive(false); } workTypeObj[type].SetActive(true); switch (type) { case 1: workTypeObj[type].GetComponentInChildren <Text>().text = string.Format("X {0}", dp.m.Length); break; case 7: reward_Gold_Text.text = string.Format("{0}G", dp.Get_Dungeon_Reward_Gold()); reward_SearchPer_Text.text = string.Format("+{0}%", dp.Get_Dungeon_Reward_SearchPer()); break; default: break; } workTypeObj[type].SetActive(true); //멘트 button_Ment_Text.text = TextData.Instance.workList_Button_Ment_Text[type]; info_Ment_Text.text = TextData.Instance.workList_Info_Ment_Text[type]; // button.Interactable = n == CodeBox.ClearList(partyInfo_ListTr); partyInfo_Obj.SetActive(type != 0); if (type != 0) { party_Gold_Text.text = string.Format("{0}G", dp.Reward); party_Turn_Text.text = string.Format("{0}T", dp.p.day); } if (type != 0 && type != 7) { PartyInfoViewer(); } }