Ejemplo n.º 1
0
        /// <summary>
        /// Executes the given action targeted at an actor. Does not necessarily have to belong to the Actions list.
        /// </summary>
        public void Execute(AIAction action, Actor target)
        {
            if (_active != null || action.Wait > float.Epsilon)
            {
                return;
            }

            if (action.Execute(_actor, target))
            {
                begin(action);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Executes the given action targeted at a position. Does not necessarily have to belong to the Actions list.
        /// </summary>
        public void Execute(AIAction action, Vector3 position)
        {
            if (_active != null || action.Wait > float.Epsilon)
            {
                return;
            }

            if (action.Execute(_actor, position))
            {
                begin(action);
            }
        }