using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace Pathoschild.Stardew.Common { /// Represents a single sprite in a spritesheet. internal class SpriteInfo { /********* ** Accessors *********/ /// The spritesheet texture. public Texture2D Spritesheet { get; } /// The area in the spritesheet containing the sprite. public Rectangle SourceRectangle { get; } /********* ** Public methods *********/ /// Construct an instance. /// The spritesheet texture. /// The area in the spritesheet containing the sprite. public SpriteInfo(Texture2D spritesheet, Rectangle sourceRectangle) { this.Spritesheet = spritesheet; this.SourceRectangle = sourceRectangle; } } }