Exemplo n.º 1
0
 public void PassLevel()
 {
     //on passing a level, respawn count reset and main menu or next level invoked
     Respawn.ResetRespawns();
     if (sceneIndex == 3)
     {
         Invoke("LoadMainMenu", 1f);
     }
     else
     {
         if (levelPassed < sceneIndex)
         {
             PlayerPrefs.SetInt("LevelPassed", sceneIndex);
         }
         LevelSign.gameObject.SetActive(false);
         YouWinText.gameObject.SetActive(true);
         Invoke("LoadNextLevel", 1f);
     }
 }