Question by
SoftisDeluxe · May 11, 2019 at 02:24 PM ·
c#timetimer
How to create a timer that only increases when if command is true?
I want to create a timer that increases but only when a if command is true. How do i do that in Unity?
Comment
Answer by DaresFireson · May 11, 2019 at 08:36 PM
private bool myCondition;
private float timer;
if(myCondition)
timer += Time.deltaTime;