Пример #1
0
        /// <summary>
        /// Changes the active Animation.
        /// </summary>
        /// <param name="animation">The new Animation.</param>
        /// <param name="element">The new AnimationElement of the given Animation.</param>
        private void SetAnimation(Animation animation, AnimationElement element)
        {
            if (animation == null)
            {
                throw new ArgumentNullException(nameof(animation));
            }
            if (element == null)
            {
                throw new ArgumentNullException(nameof(element));
            }

            m_currentanimation = animation;
            m_currentelement   = element;

            m_finishedanimation = false;
            m_animationinloop   = false;
            m_animationtime     = CurrentAnimation.GetElementStartTime(CurrentElement.Id);
            m_elementswitchtime = CurrentElement.Gameticks;
        }