float _countDownTimeLeft = 30.0f;
bool _timerIsGoing;
void Update()
{
UpdCountDown();
}
private void UpdCountDown()
{
if (_timerIsGoing && _countDownTimeLeft > 0)
{
_countDownTimeLeft -= Time.deltaTime;
}
}
↧