/
IAnimationConfiguration.cs
58 lines (53 loc) · 1.95 KB
/
IAnimationConfiguration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System.ComponentModel;
namespace AGS.API
{
/// <summary>
/// Determines how the animation will run.
/// </summary>
public enum LoopingStyle
{
/// <summary>
/// Will animate the loop forwards, and then start again from the top
/// </summary>
Forwards,
/// <summary>
/// Will animate the loop backwards, and then start again from the bottom
/// </summary>
Backwards,
/// <summary>
/// Will animate the loop forwards, and then it will go back, and start again
/// </summary>
ForwardsBackwards,
/// <summary>
/// Will animate the loop backwards, and then will it will go forwards, and start again
/// </summary>
BackwardsForwards,
}
/// <summary>
/// Allows to configure various aspects of the animation.
/// </summary>
public interface IAnimationConfiguration : INotifyPropertyChanged
{
/// <summary>
/// Allows to configure how the animation cycles (does it run forwards, backwards, does it zig zag?)
/// </summary>
/// <value>The looping.</value>
LoopingStyle Looping { get; set; }
/// <summary>
/// Allows to configure the number of loops the animation will run before completing.
/// 0 for an endless animation.
/// </summary>
/// <value>The number of loops.</value>
int Loops { get; set; }
/// <summary>
/// Gets or sets the delay between each frame.
/// The delay is measured in frames, so if we're running at the expected 60 FPS, a delay of 5 (the default) means
/// each second 12 frames of animation will be shown.
/// Note that each frame can be configured with an additional delay. That delay will be added for this
/// overall delay for that specific frame, so a frame's delay is relative, while this delay can be used
/// as an overall speed for the entire animation.
/// </summary>
/// <value>The delay between frames.</value>
int DelayBetweenFrames { get; set; }
}
}