I made a timer script, but i want it to show up only on certain levels.
#pragma strict
var timer : float = 30.0;
function Update ()
{
timer -= Time.deltaTime;
if(timer <= 0)
{
timer = 0;
Application.LoadLevel ("End");
}
}
function OnGUI ()
{
GUI.Box (new Rect (10,10,50,20), "" + timer.ToString ("0"));
}
Is there something i can add to the code for that to happen? Thank You!