Each time I name this perform that begins the coroutine Faint, it freezes the sport. I don’t perceive why this freezes the sport although, as a result of the coroutine doesn’t have any loop.
public void StartFaint()
{
faintSecs = 1.5f;
StartCoroutine("Faint");
}
IEnumerator Faint()
{
ChangeState(true);
yield return new WaitForSeconds(1.5f);
ChangeState(true);
yield break;
}
ChangeState() simply modifications the worth of some variables.
The Coroutine is simply being began as soon as.
In accordance with the web, yield break is meant to terminate the coroutine…however perhaps I am mistaken?
Thanks upfront.