private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.name == "Player") { theOrder.PreLoadCharacter(); for (int i = 0; i < move.Length; i++) { theOrder.Move(move[i].name, move[i].direction); } } }
IEnumerator EventCoroutine() { theOrder.PreLoadCharacter(); theOrder.NotMove(); theDM.ShowDialogue(dialogue_1); yield return(new WaitUntil(() => !theDM.talking)); //대화가 끝날때까지 기다렸다가 대화가 끝나면 이동시킴 theOrder.Move("Player", "RIGHT"); theOrder.Move("Player", "RIGHT"); theOrder.Move("Player", "UP"); yield return(new WaitForSeconds(1f)); theDM.ShowDialogue(dialogue_2); yield return(new WaitUntil(() => !theDM.talking)); theOrder.Move(); }