Пример #1
0
    IEnumerator EventCoroutine()
    {
        theOrder.NotMove();
        theOrder.PreLoadCharacter();
        if (turn != "null")
        {
            theOrder.Turn("Player", turn);
        }
        //트리거 중 이동불가


        //////////////////////////////////////////////////////////////////////트리거마다 수정해야하는 부분 시작

        //thePlayer.animator.SetBool("sad", false);
        //thePlayer.GetComponent<PlayerManager>().speed = speed;
        if (bifur == 0)
        {
            Debug.Log("A");
            theDM.ShowDialogue(dialogue_1);
            yield return(new WaitUntil(() => !theDM.talking));

            theDB.progress = 1;
            theBook.ActivateUpdateIcon(2);

            //MapManager.instance.RemoveBlur(1);
            //AudioManager.instance.Play("air0");

            door.GetComponent <TransferMap>().Enabled = true;

            //bifur =1;
        }                //대화 끝날 때까지 대기 (마지막 제외 필수)
        else if (bifur == 1)
        {
            Debug.Log("B");
            theDM.ShowDialogue(dialogue_2);
            yield return(new WaitUntil(() => !theDM.talking));
        }                //대화 끝날 때까지 대기 (마지막 제외 필수)
        //Wait();
        else if (bifur == 2)
        {
            Debug.Log("C");
            theDM.ShowDialogue(dialogue_3);
            yield return(new WaitUntil(() => !theDM.talking));
        }


        //////////////////////////////////////////////////////////////////////트리거마다 수정해야하는 부분 끝

        theOrder.Move();                                                        //트리거 완료 후 이동가능
        //Debug.Log("h2");
        //theDB.trigOverList.Add(trigNum);

        //theMap.blurList.Remove("blur1");
        //theMap.GetComponent<MapManager>().blur[0].SetActive(false);

        //thePlayer.GetComponent<PlayerManager>().speed = speed;
        if (onlyOnce)
        {
            theDB.trigOverList.Add(trigNum);
        }
        if (preserveTrigger)
        {
            flag = false;
        }
        if (repeatBifur != 0)
        {
            theDB.trigOverList.Add(trigNum);
            flag  = false;
            bifur = repeatBifur;
        }
    }