private Dictionary <eStoryState, List <ReStoreSpeach> > RestoreSpeach(List <TutorialStorySpeach> _list) { Dictionary <eStoryState, List <ReStoreSpeach> > dic = new Dictionary <eStoryState, List <ReStoreSpeach> >(); if (_list != null) { for (int i = 0; i < (int)eStoryState.END; i++) { List <ReStoreSpeach> listINDic = new List <ReStoreSpeach>(); foreach (TutorialStorySpeach speach in _list) { if (speach.StoryState == (eStoryState)i) { ReStoreSpeach restore = new ReStoreSpeach(); restore.StorySpeachNumber = speach.StorySpeachnumber; restore.SpeachCharacter = speach.SpeachCharacter; restore.Speach = speach.Speach; listINDic.Add(restore); } } dic.Add((eStoryState)i, listINDic); } } return(dic); }
/// <summary> /// DB 내용에서 대사인지 함수인지 구분하는 함수 /// 문장의 첫 문자가 -이면 함수이다. /// </summary> /// <param name="_speach"></param> private void BetweenSpeachAndFunction(ReStoreSpeach _speach) { if (_speach.Speach.Contains("%") == true) { FunctionInvoke(_speach.Speach.Replace("%", "")); Obj_SpeachBox.SetActive(false); Img_NPC.gameObject.SetActive(false); //Img_NPC.enabled = false; m_PresentSpeachNumber++; StartCoroutine(WaitStartSpeach()); } else if (_speach.Speach.Contains("^") == true) { FunctionInvoke(_speach.Speach.Replace("^", "")); Obj_SpeachBox.SetActive(false); Img_NPC.gameObject.SetActive(false); m_IsTalked = false; } else { Txt_Speach.text = _speach.Speach; WaitSecond = new WaitForSeconds(0f); m_IsTalked = false; } }