예제 #1
0
 /// <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);
 }
예제 #2
0
 /// <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;
 }
예제 #3
0
        /// <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);
        }