Ejemplo n.º 1
0
    IEnumerator m_WaitForCondition(System.Func <bool> con, Fibra scheduler, IEnumerator task)
    {
        System.Func <bool> _Condition = con;

        while (!_Condition())
        {
            yield return(null);
        }

        scheduler.StartFibraCoroutine(task);
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
 public abstract bool Execute(Fibra scheduler, IEnumerator task);
Ejemplo n.º 4
0
    public override bool Execute(Fibra scheduler, IEnumerator task)
    {
        scheduler.StartCoroutine(m_WaitForCondition(m_con, scheduler, task));

        return(false);
    }
Ejemplo n.º 5
0
 public override bool Execute(Fibra scheduler, IEnumerator task)
 {
     return(true);
 }