/// <summary>
 /// Adds the frame to the list of frames in the animation.
 /// </summary>
 /// <param name="frame">The frame to add.</param>
 public virtual void AddFrame(Frame frame)
 {
     Frames.Add(frame);
 }
 /// <summary>
 /// Gets the frame from XML.
 /// </summary>
 /// <param name="element">The element used for loading.</param>
 /// <returns></returns>
 protected virtual Frame GetFrameFromXml(XElement element)
 {
     var frame = new Frame();
     frame.LoadFromXml(element);
     return frame;
 }
        /// <summary>
        /// Adds the frame to the list of frames in the animation.
        /// </summary>
        /// <param name="frame">The frame to add.</param>
        public override void AddFrame(Frame frame)
        {
            base.AddFrame(frame);

            if (TextureCache == null)
            {
                return;
            }

            var xnaframe = (XnaFrame)frame;

            xnaframe.LoadContent(TextureCache);
        }