IEnumerator AdOrEndGame()
    {
        isGameOver = true;

        //yield return new WaitForEndOfFrame();
        yield return(new WaitForSeconds(0.05f));

        orbManager.DestroyOrbs();
        yield return(new WaitForSeconds(0.95f));

        endMenu.SetActive(true);
        if (adWatched)
        {
            GameOver();
        }
    }
 public void End()
 {
     characterSpawner.DestroyCharacter();
     characterSpawner = null;
     npcManager.DespawnNPCs();
     npcManager = null;
     GameObject.Destroy(pauseOverlay);
     // OrbManager is used in the parasite tutorial to manage the static
     //  orbs that are part of the level
     if (orbManager != null)
     {
         orbManager.DestroyOrbs();
         orbManager = null;
     }
     foreach (TriggerZone zone in triggerZones)
     {
         zone.Reset();
     }
     foreach (InfoScreen screen in infoScreens)
     {
         screen.Reset();
     }
 }