private void SplitWord_Kor(string _text, ref List <List <string> > _splited) { for (int i = 0; i < _text.Length; ++i) { string word = _text[i].ToString(); List <string> jamo = new List <string>(); string f = ""; string m = ""; string l = ""; KorWordMaker.SplitKorWord(word, ref f, ref m, ref l); if (f.Equals("") == false && m.Equals("") && l.Equals("")) { jamo.Add(f); } else { jamo.Add(f); jamo.Add(m); jamo.Add(l); } _splited.Add(jamo); } }
private IEnumerator Action_Forward(string _input, List <List <string> > liSplited, Text txt) { var interval = new WaitForSeconds(fInterval); string text = _input; //테스트 중입니다 //""+ㅌ -> ""+테 ->"테"+ㅅ -> "테"+스 for (int i = 0; i < liSplited.Count; ++i) { List <string> ss = liSplited[i]; string cur = ""; string cur_pos = text; for (int j = 0; j < ss.Count; ++j) { yield return(interval); if (eCodeType == CodeType.Code_NoneKor) //한글을 제외하고는 그냥 한단어씩 그대로 출력 { cur = ss[j]; } else //한글은 자모별로 다 따로 액션을 취함 { string f = j >= 0 ? ss[0] : ""; if (ss.Count != 1) { string m = j >= 1 ? ss[1] : ""; string l = j >= 2 ? ss[2] : ""; cur = KorWordMaker.GetKorWord(f, m, l); } else { cur = f; } } txt.text = string.Concat(cur_pos, cur); } text = string.Concat(text, cur); } procForward = null; }
private IEnumerator Action_Backward(string _input, List <List <string> > liSplited, Text txt) { var interval = new WaitForSeconds(fInterval); string text = _input; //테스트 중입니다 //테스트 중입니다 -> 테스트 중입니ㄷ -> 테스트 중입니 for (int i = liSplited.Count - 1; i >= 0; --i) { List <string> ss = liSplited[i]; string cur = ""; string cur_pos = text.Remove(text.Length - 1, 1); for (int j = ss.Count - 1; j >= 0; --j) { yield return(interval); if (eCodeType == CodeType.Code_NoneKor) //한글을 제외하고는 그냥 한단어씩 그대로 출력 { cur = ss[j]; } else //한글은 자모별로 다 따로 액션을 취함 { string f = j >= 0 ? ss[0] : ""; if (ss.Count != 1) { string m = j >= 1 ? ss[1] : ""; string l = j >= 2 ? ss[2] : ""; cur = KorWordMaker.GetKorWord(f, m, l); } else { cur = f; } } txt.text = string.Concat(cur_pos, cur); } text = cur_pos; } procBackward = null; }