Originally Posted by
suicidity
get it I don't
k? mad u? my flow control?
lol, I suppose if you don't get it not so many else will.
It allows you to do stuff like this in EndScene:
Code:
WoWGameObject fishingBobber = ...;
while (!fishingBobber.IsBobbing)
_coroutine.Yield();
Or you could write a sleep function:
Code:
void Sleep(int ms)
{
DateTime now = DateTime.Now;
while (DateTime.Now.Subtract(now).TotalMilliseconds < ms)
{
_coroutine.Yield();
}
}
With coroutines that would be able to run in EndScene without causing a hangup. Yielding causes it to restore the stack and jump back to after the 'Enter' function call - when you enter again, control flow is resumed after the 'yield'.