ok this is my code and it never seems to reach zero. I don’t understand why my Variable myTimer doesn’t reach zero ever. I even put a debug messege thing to tell me if myTimer more than zero and also when my timer is zero. but the one to tell me when my timer is zero never appeared cause like i said it doesn’t seem like myTimer is reaching zero.
The following code is in my Update() method
As soon as user clicks key G, set myTimer to 4.0f (forseconds)
//By the way myTimer is a float
if( myTImer > 0 )
myTimer -= Time.deltaTime;
//do something
}
else if( myTimer == 0){
//do something until count down something
//when count that something
//then set myTimer = -1
}