Пример #1
0
    public void RestartLevel()
    {
        var currentSceneindex = SceneManager.GetActiveScene().buildIndex;

        SceneManager.LoadScene(currentSceneindex);
        Time.timeScale = 1f;
        GameIsPaused   = false;
        lives.CalculateLifeLoss();
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     if (startTimer == true)
     {
         countdown -= Time.deltaTime;
         timer.text = countdown.ToString("F1");
         if (countdown < 0)
         {
             lives.CalculateLifeLoss();
         }
     }
     else
     {
         return;
     }
 }