Question by
AleksND · Oct 26, 2018 at 05:37 PM ·
c#coroutinedelayienumerator
How can i change the value of a variable from an IEnumerator
I am using an IEnumerator to change multiple booleans, (e.g. Frozen to be false)
public void ChangeStatus(ref bool status)
{
if(status == true)
{
TimeDelay(status);
}
}
public IEnumerator TimeDelay(bool status)
{
yield return new WaitForSeconds(ResistanceLevel);
status = false;
}
IEnumerator does not allow to pass the argument by REF .Any alternate solutions thank you.
Comment