Exemple #1
0
        /************************************************************************************************************************/

        /// <summary>
        /// Invokes the <see cref="AnimancerEvent.Sequence.OnEnd"/> callback of the state that is playing the animation
        /// which triggered the event. Returns true if such a state exists (even if it doesn't have a callback).
        /// </summary>
        internal bool TryInvokeOnEndEvent(AnimationEvent animationEvent)
        {
            for (int i = States.Count - 1; i >= 0; i--)
            {
                if (AnimancerPlayable.TryInvokeOnEndEvent(animationEvent, States[i]))
                {
                    return(true);
                }
            }

            return(false);
        }
Exemple #2
0
        /************************************************************************************************************************/

        /// <summary>
        /// Invokes the <see cref="AnimancerEvent.Sequence.OnEnd"/> callback of the state that is playing the animation
        /// which triggered the event. Returns true if such a state exists (even if it doesn't have a callback).
        /// </summary>
        internal bool TryInvokeOnEndEvent(AnimationEvent animationEvent)
        {
            var count = States.Count;

            for (int i = 0; i < count; i++)
            {
                if (AnimancerPlayable.TryInvokeOnEndEvent(animationEvent, States[i]))
                {
                    return(true);
                }
            }

            return(false);
        }