preferences now use object as type for serialization and no longer uses marker interface.

This commit is contained in:
2018-12-05 00:03:00 -06:00
parent 151480eaee
commit 87823b26d6
9 changed files with 28 additions and 35 deletions

View File

@@ -35,13 +35,20 @@ namespace RecrownedAthenaeum.DataTypes
return dictionaryOfRegions[name].AsTexture2D(graphicsDevice, texture);
}
public struct TextureAtlasRegion : IComparable<TextureAtlasRegion>, IDisposable
public class TextureAtlasRegion : IComparable<TextureAtlasRegion>, IDisposable
{
public string name;
Rectangle sourceRectangle;
NinePatch ninepatch;
public readonly string name;
readonly Rectangle sourceRectangle;
readonly NinePatch ninepatch;
Texture2D regionTexture;
public TextureAtlasRegion(string name, Rectangle source, NinePatch ninePatch)
{
this.name = name;
this.sourceRectangle = source;
this.ninepatch = ninePatch;
}
public void Draw(SpriteBatch batch, Rectangle destination, Texture2D fromTexture, Color color, float rotation, Vector2 origin)
{
batch.Draw(fromTexture, destination, sourceRectangle, color, rotation, origin, SpriteEffects.None, 0f);