Пример #1
0
 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;
 }
Пример #2
0
 void Update()
 {
     if (Time.time - time > 3)
     {
         DrugsStat.AllStatsReset();
         // SceneManager.LoadScene("Required");
         SceneManager.LoadScene(nameScene);
         // SceneManager.LoadScene("home");
     }
 }
Пример #3
0
 // Update is called once per frame
 void Update()
 {
     if (dox)
     {
         totalPoints = DrugsStat.calculate();
         totalPoints = totalPoints * DrugsStat.wspolczynnikRundy / Timer.time;           //wspolczynnik rundy
     }
     if (EndPoint.done == true)
     {
         EndPoint.done = false;
         dox           = false;
         totalPoints   = ds.getComboMultiplier(ds.getKilledCombo(), totalPoints);
         DrugsStat.totalPointsLevel = totalPoints;
         SetCountOfReachedStars();
         SetActiveStars();
         SaveLevel();
     }
     scoreForPanel.text = "        " + (int)totalPoints;
 }
Пример #4
0
 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;
 }
Пример #5
0
 void Start()
 {
     ds = new DrugsStat();
 }
Пример #6
0
 // Update is called once per frame
 void Update()
 {
     scoreValue = DrugsStat.calculate();
     score.text = "Score: " + scoreValue;
 }