protected virtual IEnumerator WaitForPlayerToFinishLevel() { while (activeDeliveryPOIs.Count > 0) { yield return(null); } GameManager.Self.runTimers = false; //GameManager.Self.player.letControlPawn = false; GameManager.Self.levelTransitioner.TransitionScreen(false); if (GameManager.Self.player.possessedPawn) { GameManager.Self.DoWorldLooping = true; if (GameManager.Self.worldLooper) { GameManager.Self.worldLooper.transform.position = Vector3.zero; } } StartCoroutine(WaitToTeleportPlayerTo(Vector2.zero)); ProcRoom pr = _seedRoom.GetComponent <ProcRoom>(); while (GameManager.Self.levelTransitioner.AnimIsPlaying) { yield return(null); } pr.DestroyRoom(); }
public virtual void DestroyNode() { if (_thisRoom) { ProcRoom pr = _thisRoom.GetComponent <ProcRoom>(); pr.DestroyRoom(); } Destroy(gameObject); }