Implemented SubSprites into AnimationEditor!

This commit is contained in:
quinnvoker
2018-12-09 13:49:19 -08:00
parent 95c1674b08
commit 0a02cde928
3 changed files with 221 additions and 98 deletions
+8
View File
@@ -75,6 +75,14 @@ namespace QURO.AnimationLibrary
public void Draw(SpriteBatch spriteBatch, Vector2 position, Color tint)
{
spriteBatch.Draw(SpriteSheet, position - CurrentFrame.Origin, CurrentFrame.Bounds, tint);
if (CurrentFrame.SubSprites != null)
{
for (int index = 0; index < CurrentFrame.SubSprites.Count; index++)
{
var subSprite = CurrentFrame.SubSprites[index];
spriteBatch.Draw(SpriteSheet, position - subSprite.Origin + CurrentFrame.SubSpritePositions[index], subSprite.Bounds, tint);
}
}
}
public void Draw(SpriteBatch spriteBatch, Vector2 position, Vector2 spriteOffset, Color tint)