Exemplo n.º 1
0
	public override void Start() {
		current = actions.Current;
		current.register (currentDone);
		current.Start ();
		bool hasNext = actions.MoveNext ();
		if(hasNext){
			next = actions.Current;
		}
	}
Exemplo n.º 2
0
    public override void Start()
    {
        current = actions.Current;
        current.register(currentDone);
        current.Start();
        bool hasNext = actions.MoveNext();

        if (hasNext)
        {
            next = actions.Current;
        }
    }
Exemplo n.º 3
0
    //Called when curreng subAction finishes
    //Either start next action, or if no more actions left, call done
    protected void currentDone()
    {
        if (next != null)
        {
            next.register(currentDone);
            next.Start();

            current = next;
            bool hasNext = actions.MoveNext();
            if (hasNext)
            {
                next = actions.Current;
            }
            else
            {
                next = null;
            }
        }
        else
        {
            done();
        }
    }