/// <summary> /// Transport the player from one point to another with a camera animation. /// </summary> IEnumerator TransportPlayer(GameObject player) { cameraTrans.FadeIn(); yield return(new WaitForSeconds(cameraTrans.GetFadeTime())); // Transport the player to the exit. player.transform.position = transform.GetChild(0).transform.position; cameraTrans.FadeOut(); player.GetComponent <PlayerMovement>().canMove = true; }