preferences now use object as type for serialization and no longer uses marker interface.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user