override public ICoroutineBase Update()
        {
            if (_finished)
            {
                return(this);
            }

            if (_block.MoveNext())
            {
                ICoroutineBase waitFor = covertToCoroutine(_block.Current);
                if (waitFor != null)
                {
                    waitFor = waitFor.Update();
                    if (waitFor.finished)
                    {
                        return(this.Update());
                    }
                    else
                    {
                        return(new OrderedCoroutine(waitFor, this));
                    }
                }
            }
            else
            {
                _finished = true;
            }

            return(this);
        }
Exemplo n.º 2
0
        override public ICoroutineBase Update()
        {
            if (_former.finished)
            {
                _latter = _latter.Update();
                return(_latter);
            }
            else
            {
                _former = _former.Update();
            }

            return(this);
        }
Exemplo n.º 3
0
 public OrderedCoroutine(ICoroutineBase f, ICoroutineBase b)
 {
     _former = f; _latter = b;
 }