i’d like to make count down timer that shows how many time remian. but unity said Time dose not contain a definition for ‘deltaTime’ i dont know why piz help me.
float timeLeft = 120.0f;
Text text;
void Awake ()
{
text = GetComponent<Text> ();
}
void Update()
{
timeLeft -= Time.deltaTime;
text.text = "time Left:" + timeLeft;
if(timeLeft < 0)
{
Application.LoadLevel("GameOver");
}
}