IEnumerator InitialisePlayerArrival() { string arrivalDoor = PersistentEngine.GetArrivalDoor(); foreach (DoorBetweenLevels door in GameObject.FindObjectsOfType <DoorBetweenLevels>()) { doors[door.levelPath] = door; } if (!string.IsNullOrEmpty(arrivalDoor) && !staticCharacter) { yield return(StartCoroutine(EnterRoom(arrivalDoor))); yield return(null); } else { if (advCamera != null && advCamera.followElroy) { advCamera.transform.position = transform.position + Vector3.up * advCamera.yFollowOffset; } if (!staticCharacter) { ChangeState(State.IdleDiagonalFront); } } yield return(null); }