void Talk(int id, bool isNPC, string Name) { int questTalkIndex = 0; string talkData = ""; //Set Talk Data if (talk.isanim)//현재 텍스트애니메이션이 출력중일때 조사키 다시입력시 대화문스킵 { talk.SetMsg(""); return; } else { questTalkIndex = questManager.GetQuestTalkIndex(id); talkData = talkManager.GetTalk(id + questTalkIndex, talkIndex); } //대화 종료 if (talkData == null) { isAction = false; talkIndex = 0; questText.text = questManager.CheckQuest(id); npcName.gameObject.SetActive(false); return;//강제종료 } //대화 진행 if (isNPC) { npcName.gameObject.SetActive(true); talk.SetMsg(talkData.Split(':')[0]);//대화문 npcName.text = Name; //Show Portrait portraitImg.sprite = talkManager.GetPortait(id, int.Parse(talkData.Split(':')[1])); //스프라이트 portraitImg.color = new Color(1, 1, 1, 1); //Animation Portrait if (prevPortarit != portraitImg.sprite) { portraitanim.SetTrigger("doEffect"); prevPortarit = portraitImg.sprite; } } else { talk.SetMsg(talkData); portraitImg.color = new Color(1, 1, 1, 0); } isAction = true; talkIndex++; }