Example #1
0
    IEnumerator MonsterFade()
    {
        Looping = true;
        this.Audio.Play();
        yield return(StartCoroutine(pannelController.CustomFade(1f, 0.05f)));

        // 사운드 출력
        // ...

        yield return(new WaitForSeconds(0.3f));

        Monsteranimator.SetBool("isStop", false);
        yield return(StartCoroutine(pannelController.CustomFade(0.04f)));

        Monsteranimator.SetBool("isStop", true);

        Looping = false;

        yield break;
    }
Example #2
0
    IEnumerator MainRoutine()
    {
        // 이동 불가 상태
        //characterMover.moveType = CharacterMover.MoveType.LOCK;
        //characterMover.myAnimator.SetBool("IsWalk", false);

        FindObjectOfType <Chapter2FirewallEvent>().isReady = false;

        // 불릿 타임 연출
        Time.timeScale = 0.3f;

        //// 괴물 움직임 코루틴 시작
        //StartCoroutine(monsterControl);


        for (int i = 0; i < 3; i++)
        {
            //StartCoroutine(MonsterControl());
            objMonster.GetComponent <Rigidbody2D>().AddForce(new Vector3(200, 0, 0));
            //AudioSource.Play();
            yield return(StartCoroutine(pannelController.CustomFade(0.5f, 0.2f)));

            // 괴물 움직임
            //objMonster.GetComponent<Rigidbody2D>().AddForce(new Vector3(200, 0, 0));

            yield return(StartCoroutine(pannelController.CustomFade(0.85f, 0.3f)));

            //yield return new WaitForSeconds(1.0f);
        }


        //// 패널 움직임 종료 시 괴물 움직임 멈춤
        //StopCoroutine(monsterControl);

        // 이동 불가 상태 해제
        //characterMover.moveType = CharacterMover.MoveType.COMMANDMOVE;
        Time.timeScale = 1.0f;

        yield break;
    }