I need to pause some code in an if statement in c#. Thread.Sleep() is NOT what I want as it pauses everything. I just want to temporarily hold the code in an if statement where it is for a few seconds.
I have tried Thread.Sleep() but it is not what I want.
This is in my Update() method.
if (jumps == jumpsToFatigue)
{
// wait for jumpFatigueWait (variable that is in seconds)
jumps = 0f;
}
I want something that can replace the comment that will pause THIS if statement ONLY for the time specified in my variable.