//public void SetDash() //{ // timeText.text = "-"; //} private void TaskOnClick() { if (PlayerPrefsController.GetLives() <= 0) { Time.timeScale = 1f; PlayerPrefsController.SetLives(3); SceneManager.LoadScene(levelScene.name); } else { SceneManager.LoadScene(levelScene.name); } }
public void DeacreaseLives() { PlayerPrefsController.SetLives(PlayerPrefsController.GetLives() - 1); if (PlayerPrefsController.GetLives() <= 0) { levelController.HandleLooseCondition(); } else { sceneLoader.Invoke("Respawn", levelLoadDelay); } }
public void Play() { Time.timeScale = 1f; if (string.IsNullOrEmpty(PlayerPrefs.GetString("SavedLevel")) == true) { print("Level set"); PlayerPrefs.SetString("SavedLevel", "Level 1"); } if (PlayerPrefsController.GetLives() <= 0) { PlayFromBegining(); } else { SceneManager.LoadScene(PlayerPrefs.GetString("SavedLevel")); } }
private void Update() { // Update Lives Text livesText.text = PlayerPrefsController.GetLives().ToString(); }