Added SubSprite and SubSpritePosition lists to Frame, Added SubSprite-relevant controls to AnimationEditor, made AnimationEditor sizable
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using QURO;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace QURO.AnimationLibrary
|
||||
@@ -6,20 +7,30 @@ namespace QURO.AnimationLibrary
|
||||
public class Frame
|
||||
{
|
||||
public SpriteMapRegion Sprite { get; set; }
|
||||
public List<SpriteMapRegion> SubSprites { get; set; }
|
||||
public List<Vector2> SubSpritePositions { get; set; }
|
||||
|
||||
public float Delay { get; set; }
|
||||
|
||||
public string Name { get { return Sprite.Name; } }
|
||||
public Rectangle Bounds { get { return Sprite.Bounds; } }
|
||||
public Vector2 Origin { get { return Sprite.Origin; } }
|
||||
|
||||
public Frame() : this(new SpriteMapRegion(), 0)
|
||||
|
||||
public Frame() : this(new SpriteMapRegion(), 0, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public Frame(SpriteMapRegion sprite, float delay)
|
||||
public Frame(SpriteMapRegion sprite, float delay) : this(sprite, delay, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public Frame(SpriteMapRegion sprite, float delay, List<SpriteMapRegion> subSprites, List<Vector2> subSpritePositons)
|
||||
{
|
||||
Sprite = sprite;
|
||||
Delay = delay;
|
||||
SubSprites = subSprites;
|
||||
SubSpritePositions = subSpritePositons;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user