public void DestroyCharacter()
 {
     if (characterSpawner != null)
     {
         characterSpawner.DestroyCharacter();
     }
 }
 public void Restart(CharacterSpawner spawner)
 {
     // Respawn player
     spawner.DestroyCharacter();
     SpawnPlayer();
     UiManager.Instance.RemoveHud();
     UiManager.Instance.SetCharacterType(characterType);
     UiManager.Instance.DeactivateControls();
     foreach (TriggerZone zone in triggerZones)
     {
         zone.Reset();
     }
     foreach (InfoScreen screen in infoScreens)
     {
         screen.Reset();
     }
     // Respawn NPCs
     npcManager.Restart();
     if (characterType == CharacterType.Parasite)
     {
         // NPC Infection Detector is only used in Parasite tutorial
         //  and will log an error if it's Reset in the Hunter tutorial
         detector.Reset();
     }
 }
 // CLEANUP: this and its associated variables should probably be extracted
 //  to a separate class
 public static void OnParasiteKilled(CharacterSpawner spawner)
 {
     spawner.DestroyCharacter();
     if (parasitesStillAlive == 0)
     {
         UiManager.Instance.SetReturnToMenuPanelActive(true);
     }
 }
 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();
     }
 }