private int _timeLeft = 5;
public Text countdownText;
private float _currentTime;
void Start()
{
_currentTime = _timeLeft;
}
void Update()
{
_currentTime -= Time.deltaTime;
countdownText.text = (int)_currentTime.ToString());
if(_currentTime <= 0)
{
Debug.Log("StartGame");
}
}