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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user