So I have this script
public var ClickTimer : float = 5f;
function Update () {
var Timer = 0.0f;
var time = Time.time;
if (something){}
else if (Timer <= ClickTimer) {
Timer += time;
print(Timer + time); DoubleTap = true;}
}
else{
DoubleTap = false;
}
}
but it never ends, once Timer = 5; it just keeps going which should make the if statement not true.
↧