private void Update() { if ((health.GetHealth() <= 0) || (timer.GetTime() <= 0)) { Debug.Log("You Loose"); GameOverData.isWinner = false; Initiate.Fade("GameOver", Color.black, 1.5f); } else if (score.GetIsMaxScore() == true) { Debug.Log("You Win"); GameOverData.isWinner = true; Initiate.Fade("GameOver", Color.black, 1.5f); } }
private void UpdateTimer() { timerText.text = Mathf.RoundToInt(levelTimer.GetTime()).ToString(); }