public NPCData GetNPCDataRandom(NPC_TYPE npc_type, List <int> exclusion_ids = null) { List <int> range = npcTypeOnNpcIdList[(int)npc_type].GetRange(0, npcTypeOnNpcIdList[(int)npc_type].Count); if (exclusion_ids != null) { int i = 0; for (int count = exclusion_ids.Count; i < count; i++) { int num = range.IndexOf(exclusion_ids[i]); if (num >= 0) { range.RemoveAt(num); } } } if (range.Count <= 0) { range = npcTypeOnNpcIdList[(int)npc_type].GetRange(0, npcTypeOnNpcIdList[(int)npc_type].Count); } int index = (int)(Random.get_value() * (float)range.Count); int key = range[index]; return(npcDataTable.Get((uint)key)); }
public string GetTalk(NPC_TYPE id, int talkindex) { if (talkindex == m_talkData[id].Length) { return(null); } else { return(m_talkData[id][talkindex]); } }
public string CheckQuest(NPC_TYPE _id) { if (_id == questDic[questId].npcId[questActionIndex]) { questActionIndex++; } if (questActionIndex == questDic[questId].npcId.Length) { NextQuest(); } return(questDic[questId].questName); }
void Talk(NPC_TYPE _npcId) { int questTalkIndex = quest.GetQuestTalkIndex(_npcId); string talkData = talkManager.GetTalk(_npcId + questTalkIndex, talkIndex); //대화 끝날 때 if (talkData == null) { isClick = false; talkIndex = 0; return; } talkText.text = talkData; isClick = true; talkIndex++; }
public int GetQuestTalkIndex(NPC_TYPE _id) { return(questId + questActionIndex); }
public GameObject GetPortrait(NPC_TYPE id) { return(m_portraitData[id]); }