public Player() { Animation anim = new Animation("default", 1, 1); var frame = anim.CreateFrame(); frame[0].Foreground = Color.Yellow; frame[0].Background = Color.Black; frame[0].CharacterIndex = 1; anim.Commit(); AddAnimation(anim); SetActiveAnimation(anim); }
/// <summary> /// Creates a new entity with the specified font. /// </summary> /// <param name="font">The font to use when rendering this entity.</param> public Entity(Font font) : base(null, new SpriteBatch(Engine.Device)) { Font = font; IsVisible = true; _currentAnimation = new Animation("default", 1, 1); _currentAnimation.Font = font; _currentAnimation.CreateFrame(); _currentAnimation.Commit(); _animations.Add(CurrentAnimation); _animationBoundingBox = new Rectangle(0, 0, 1, 1); }