public void Step(long now) { if (IsRunning && nextRun <= now) { IsRunning = coroutine.MoveNext(); StateReturn sr = coroutine.Current; nextRun = now + (sr?.NextRun ?? 0); if (sr?.NextState != null) { coroutine = sr.NextState; IsRunning = true; } } }