public void RestartLevel() { var currentSceneindex = SceneManager.GetActiveScene().buildIndex; SceneManager.LoadScene(currentSceneindex); Time.timeScale = 1f; GameIsPaused = false; lives.CalculateLifeLoss(); }
// 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; } }