Пример #1
0
        /// <summary>
        ///    Creates a new Animation object for animating this skeleton.
        /// </summary>
        /// <param name="name">The name of this animation</param>
        /// <param name="length">The length of the animation in seconds</param>
        /// <returns></returns>
        public virtual Animation CreateAnimation(string name, float length)
        {
            // Check name not used
            if (animationList.ContainsKey(name))
            {
                throw new Exception("An animation with the name already exists");
            }

            Animation anim = new Animation(name, length);

            animationList.Add(name, anim);

            return(anim);
        }