private void Update() { if (isCountingDown) { if ((int)timer < lastSecond) { sfxPlayer.PlayRandom(clockTickingSoundEffects); lastSecond = (int)timer; } reverbFilter.reverbLevel = Mathf.Lerp(600, -2000, timer / startTime); timer -= Time.deltaTime * countdownSpeedMultiplier; radial.fillAmount = Mathf.Clamp01(timer / startTime); SetTimerText(); if (timer <= 0) { GameManager.Instance.Lose(); } } }