SpriteMapEditor Rework

-Renamed Sprite to SpriteMapRegion
-Updated Frame code in QURO.AnimationLibrary to use SpriteMapRegions instead of Rectangles
-Replaced Drag and drop sprite rearrangement behaviour in Editor with simpler, less buggy up/down button system
-Changed Editor's save/load format to be a MonoGame compatible Dictionary<string, SpriteMapRegion> rather than a List
This commit is contained in:
quinnvoker
2018-11-23 23:30:24 -08:00
parent acda9d30fc
commit 82ad36e485
10 changed files with 299 additions and 165 deletions
+2 -2
View File
@@ -74,12 +74,12 @@ namespace QURO.AnimationLibrary
public void Draw(SpriteBatch spriteBatch, Vector2 position, Color tint)
{
spriteBatch.Draw(SpriteSheet, position, CurrentFrame.SourceRect, tint);
spriteBatch.Draw(SpriteSheet, position, CurrentFrame.Bounds, tint);
}
public void Draw(SpriteBatch spriteBatch, Vector2 position, Vector2 spriteOffset, Color tint)
{
Rectangle sourceRect = CurrentFrame.SourceRect;
Rectangle sourceRect = CurrentFrame.Bounds;
sourceRect.Offset(spriteOffset);
spriteBatch.Draw(SpriteSheet, position, sourceRect, tint);