Do you know guys how to add a 20 seconds time bonus when my countdown timer reaches at 10? sorry guys if this question is not much a big deal; But i really need it as soon as possible so thats why i really need your help guys. God bless you all guys!
here’s my code…
//time
var startTime = 30.0;
var timer: GameObject;
function Update()
{
timeTaken = startTime - Time.time;
timer.guiText.text = FormatTime (timeTaken);
//this is the condition which is not working
if (intTime== 10);
{
timer.startTime + 30.0 ,
}
//end
}
function FormatTime (time)
{
var intTime : int = time;
var minutes : int = intTime / 60;
var seconds : int = intTime % 60;
var fraction : int = time * 10;
fraction = fraction % 10;
I am saying timer is a variable of type GameObject. It contains a GameObject. The previous link shows all variables of an object of type GameObject. And among them, there is no such thing as a variable called startTime.