I want to create a timer that increases but only when a if command is true. How do i do that in Unity?
private bool myCondition;
private float timer;
if(myCondition)
timer += Time.deltaTime;
I want to create a timer that increases but only when a if command is true. How do i do that in Unity?
private bool myCondition;
private float timer;
if(myCondition)
timer += Time.deltaTime;