Exemple #1
0
        /// <summary>
        /// Creates an action sequence.
        /// </summary>
        /// <param name="owner">The component which is creating the action.</param>
        /// <returns>An ActionSet object, used for Action constructors.</returns>
        public static ActionSet Sequence(MonoBehaviour component)
        {
            // Construct the sequence
            ActionSet sequence = new ActionSequence();

            // Add it to the owner
            component.gameObject.Actions().Add(sequence);
            // Return it
            return(sequence);
        }
Exemple #2
0
        /// <summary>
        /// Creates an action sequence.
        /// </summary>
        /// <param name="owner">A reference to the owner of this action sequence.</param>
        /// <returns>An ActionSet object, used for Action constructors.</returns>
        public static ActionSet Sequence(ActionsOwner owner)
        {
            // Construct the sequence
            ActionSet sequence = new ActionSequence();

            // Add it to the owner
            owner.Add(sequence);
            // Return it
            return(sequence);
        }