コード例 #1
0
    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();
        }
    }
コード例 #2
0
 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();
     }
 }