need help with the game timer.

im trying to make a countdown timer … what want to do is to extend the time in 10 seconds when the time reaches 20. :slight_smile:
here is my code…

var startTime = 30.0;

function Update () {

if(startTime==30)
{
//The time left for player to complete level
timeLeft = startTime - Time.time;
//Don’t let the time left go below zero
timeLeft = Mathf.Max (0, timeLeft);
//Format the time nicely
guiText.text = FormatTime (timeLeft);

if(startTime== 20)
{
startTime=20+10;
}
}

}

//Format time like this
//12(minutes):34(seconds).5(fraction)

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;
//Build string with format
//12(minutes):34(seconds).5(fraction)

Please use code tags when posting code.