IEnumerator m_WaitForCondition(System.Func <bool> con, Fibra scheduler, IEnumerator task) { System.Func <bool> _Condition = con; while (!_Condition()) { yield return(null); } scheduler.StartFibraCoroutine(task); }
IEnumerator m_WaitForSecond(float delay, Fibra scheduler, IEnumerator task) { float timer = Time.time + delay; float leftTime = 10; while (0 < leftTime) { if (!pause) { leftTime = timer - Time.time; } else { timer = Time.time + leftTime; } yield return(null); } scheduler.StartFibraCoroutine(task); }
public abstract bool Execute(Fibra scheduler, IEnumerator task);
public override bool Execute(Fibra scheduler, IEnumerator task) { scheduler.StartCoroutine(m_WaitForCondition(m_con, scheduler, task)); return(false); }
public override bool Execute(Fibra scheduler, IEnumerator task) { return(true); }