public void Return() { Time.timeScale = 1.0f; DrugsStat.AllStatsReset(); SceneManager.LoadScene(SceneManager.GetActiveScene().name); Time.timeScale = 1f; // Time.fixedDeltaTime = GameObject.Find("Hero").GetComponent<DeathScene>().temp; }
void Update() { if (Time.time - time > 3) { DrugsStat.AllStatsReset(); // SceneManager.LoadScene("Required"); SceneManager.LoadScene(nameScene); // SceneManager.LoadScene("home"); } }
public void NextLevelButton(string name) { DrugsStat.AllStatsReset(); if (SceneManager.GetActiveScene().name == name && DrugsStat.completed == false) // powtorzenie, nie zaliczony lvl { Do(name); } else if (SceneManager.GetActiveScene().name == name && DrugsStat.completed == true) // powtorzenie ale level zaliczony { if (!DrugsStat.openedLvls.Contains(DrugsStat.level)) { DrugsStat.openedLvls.Add(DrugsStat.level); } Do(name); } else if (AddCompletedLevel()) // nastepny level { Do(name); DrugsStat.completed = false; } Time.timeScale = 1f; }