コード例 #1
0
    private IEnumerator TeleportCoroutine(Placement room)
    {
        animator.SetBool("Open", false);
        yield return(SimpleFunctions.WaitForEndOfAnimation(animator));

        animator.SetBool("isTeleporting", true);
        yield return(SimpleFunctions.WaitForEndOfAnimation(animator));

        yield return(StartCoroutine(Camera.main.GetComponent <Camera_Bounds>().FadeScreen(true, 2f, fadeColor)));

        GameManager.instance.TeleportPlayer(room);

        StartCoroutine(Camera.main.GetComponent <Camera_Bounds>().FadeScreen(false, 2f, fadeColor));
        Player.instance.canShoot          = true;
        Player.instance.movement.dontMove = false;
        animator.SetBool("isTeleporting", false);
    }