private void SceneWasLoaded(UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode)
 {
     if (ReturnToCacheOnLevelLoad)
     {
         SpawningPool.RecycleActiveObjects();
     }
 }
Example #2
0
    public void RestartGame()
    {
        StageManager.Instance.ResetData();
        UpgradeSpawnManager.Instance.ResetData();
        UIScore.Instance.ResetData();
        PlayerController.Instance.Spawn();

        SpawningPool.RecycleActiveObjects();
        StageManager.Instance.LoadStage();
    }