void Update() { if (HasDied() && !isGameOver) { isGameOver = true; foreach (PlayerController player in players) { player.SendMessage("kill"); } fader.FadeTo("GameOver"); } if (HasWon() && !isWin) { isWin = true; foreach (PlayerController player in players) { player.SendMessage("kill"); } fader.FadeTo("Win"); } if (Input.GetButtonDown("Cancel")) { SceneManager.LoadScene(0); } }
public void Continue() { if (levelToUnlock == 0) { sceneFade.FadeTo(menuScene); } else { sceneFade.FadeTo(nextLevel); } }
public void PlayGame() { sceneFader.FadeTo(levelOne); }
public void StartGame() { WaveSpawner.EnemiesAlive = 0; sceneFade.FadeTo(levelToLoad); }
public void Continue() { PlayerPrefs.SetInt("levelReached", levelToUnlock); sceneFader.FadeTo(nextLevel); }
public void Select(string levelName) { sceneFade.FadeTo(levelName); }
public void Play() { sceneFader.FadeTo(LevelToLoad); }
public void Continue() { player.level = levelToUnlock; player.Save(player.GetCurrentSavedFile()); sceneFader.FadeTo(nextLevel); }
public void Retry() { Togle(); sceneFader.FadeTo(SceneManager.GetActiveScene().name); }
public void Retry() { sceneFade.FadeTo(SceneManager.GetActiveScene().name); }
public void PlayGame() { sceneFader.FadeTo(menuSceneName); }
public void goToScene(string sceneName) { sceneFader.FadeTo(sceneName); }
public void Play() { sceneFade.FadeTo("LevelSelect"); }
public void Retry() { Time.timeScale = 1; sceneFader.FadeTo(SceneManager.GetActiveScene().name); }
public void Menu() { Toggle(); sceneFader.FadeTo(menuSceneName); }
public void Select(string levelName) { fader.FadeTo(levelName); }
public void Retry() { WaveSpawner.EnemiesAlive = 0; sceneFade.FadeTo(SceneManager.GetActiveScene().name); }