Implementation Working

Used AnimationGenerator to port old animations into new system, tested and seems stable.
This commit is contained in:
quinnvoker
2018-11-17 14:55:38 -08:00
parent 65ed454707
commit fb85769677
12 changed files with 472 additions and 10 deletions
+21 -2
View File
@@ -6,12 +6,31 @@ namespace QURO.AnimationLibrary
{
public string Name { get; set; }
public bool IsLooping { get; set; }
public float Delay { get; set; }
public Rectangle[] Frames { get; set; }
public Frame[] Frames { get; set; }
public bool IsStillImage => Frames.Length <= 1;
public Animation() { }
public Animation(string name, Frame[] frames, bool loop)
{
Name = name;
Frames = frames;
IsLooping = loop;
}
public Animation(string name, Rectangle[] sourceRects, float delay, bool loop)
{
Name = name;
Frames = new Frame[sourceRects.Length];
for(int index = 0; index < sourceRects.Length; index++)
{
Frames[index] = new Frame(sourceRects[index], delay);
}
IsLooping = loop;
}
}
}