// Update is called once per frame public void play() { click.Play(); if (CustomPlayerPrefs.LevelPotence() > 1) { SceneManager.LoadScene(CustomPlayerPrefs.LevelPotence() + 1); } else { SceneManager.LoadScene(5); } //done }
private void OnTriggerEnter(Collider other) { if (other.name == "Player") { LevelCompleteUI.SetActive(true); CustomPlayerPrefs.LevelUpdate(CustomPlayerPrefs.LevelPotence() + 1); if (CustomPlayerPrefs.LevelPotence() == 4) { CustomPlayerPrefs.LevelUpdate(0); } Time.timeScale = 0f; //SceneManager.LoadScene(sceneToLoad); } }