using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Serialization; using Microsoft.Xna.Framework.Graphics; namespace J2i.Net.AnimatedSpriteLibrary { public class AnimatedSprite { public string Name { get; set; } public string PreferredTextureName { get; set; } internal SpriteFont DebugFont { get; set; } //Set this to true and set a debug font to see a frame //index next to an animation public bool ShowFrameNumber { get; set; } [XmlIgnore] internal Texture2D CurrentTexture { get; set; } public void SetTexture(Texture2D sourceTexture) { CurrentTexture = sourceTexture; } //Setting a debug font and then setting ShowFrameNumber //to true will cause a frame index to appear next to an animation. public void SetDebugFont(SpriteFont font) { DebugFont = font; } public List<VisualState> VisualStateList { get; set; } public AnimatedSprite() { VisualStateList = new List<VisualState>(); } public AnimatedSpriteInstance CreateInstance() { return new AnimatedSpriteInstance(this); } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)