Exemple #1
0
    public int subActionIndex = 0;         //顺序动作里某个动作的编号

    public static CCSequeneActions CreateSSAction(List <SSAction> _actionList, int _repeatTimes = 0)
    {
        CCSequeneActions action = ScriptableObject.CreateInstance <CCSequeneActions>();

        action.repeatTimes = _repeatTimes;
        action.actionList  = _actionList;
        return(action);
    }
    public static CCSequeneActions GetSSAction(List <SSAction> _sequence, int _repeat = 0)
    {
        CCSequeneActions action = ScriptableObject.CreateInstance <CCSequeneActions>();

        action.repeat   = _repeat;
        action.sequence = _sequence;
        return(action);
    }
Exemple #3
0
    void addCombinedMoving(GameObject sourceObj, Vector3[] target, float[] speed, bool isCatching)
    {
        List <SSAction> acList = new List <SSAction>();

        for (int i = 0; i < target.Length; i++)
        {
            acList.Add(CCMoveToAction.CreateSSAction(target[i], speed[i], isCatching));
        }
        CCSequeneActions MoveSeq = CCSequeneActions.CreateSSAction(acList);

        this.runAction(sourceObj, MoveSeq, this);
    }