public void GameOver(int sceneIndex) { // if the game has ended no action will be done if (levelComplete) { return; } Debug.Log("ENDGAME"); PlayerPrefs.SetInt(Level.LAST_LEVEL_KEY, sceneIndex); // setting last played level to PlayerPrefs levelComplete = true; DisableGameElements(); cameraAnimator.SetGameOverTrigger(); // activatin game over animatin by setting up the trigger }
public void GameOver() { DisableGameElements(); animator.SetGameOverTrigger(); }
public void GameOver(int sceneIndex) { DisableGameElements(); PlayerPrefs.SetInt(Level.LAST_LEVEL_KEY, sceneIndex); cameraAnimator.SetGameOverTrigger(); }