示例#1
0
    public static MtSequence CreateWithVariableList(MtFiniteTimeAction action1, params MtFiniteTimeAction[] actions)
    {
        MtFiniteTimeAction now  = null;
        MtFiniteTimeAction prev = action1;
        bool bOneAction         = true;
        int  index = 0;

        while (index < actions.Length)
        {
            now = actions[index];
            index++;
            if (now != null)
            {
                prev       = CreateWithTwoActions(prev, now);
                bOneAction = false;
            }
        }
        // If only one action is added to Sequence, make up a Sequence by adding a simplest finite time action.
        if (bOneAction)
        {
            prev = CreateWithTwoActions(prev, MtExtraAction.Create());
        }
        return(prev as MtSequence);
    }
示例#2
0
    public static MtExtraAction Create()
    {
        MtExtraAction ret = new MtExtraAction();

        return(ret);
    }