Class AbstractAnimationOptions
- Namespace
- FriedSynapse.FlowEnt
Provides common options for animations.
public class AbstractAnimationOptions
- Inheritance
-
AbstractAnimationOptions
- Derived
- Inherited Members
- Extension Methods
Constructors
AbstractAnimationOptions()
Initialises a new instance of the AbstractAnimationOptions class.
public AbstractAnimationOptions()
Fields
DefaultLoopCount
public const int DefaultLoopCount = 1
Field Value
DefaultTimeScale
public const float DefaultTimeScale = 1
Field Value
Properties
AutoStart
Whether the animation should auto start or not. If set to false, you need to start the animation manually.
public bool AutoStart { get; set; }
Property Value
Remarks
AutoStart for an animation requires to have a helper that looks for the next frame therefore manually starting the Animation will always be more efficient.
Delay
The amount of time that the animation will skip from the moment it started till the animation begins.
public float Delay { get; set; }
Property Value
DelayUntil
The condition that will let the animation begin when it returns true.
public Func<bool> DelayUntil { get; set; }
Property Value
LoopCount
The number of loops the animation will run. Use null for infinite loops.
public int? LoopCount { get; set; }
Property Value
- int?
Name
The name of the animation.
public string Name { get; set; }
Property Value
SkipFrames
The amount of frames that the animation will skip from the moment it started till the animation begins.
public int SkipFrames { get; set; }
Property Value
TimeScale
The scale of the time that will be applied to the animation.
public float TimeScale { get; set; }
Property Value
UpdateType
The update type of the animation.
public UpdateType UpdateType { get; set; }
Property Value
Methods
SetAutoStart(bool)
Sets whether this animation should auto-start or not.
public AbstractAnimationOptions SetAutoStart(bool autoStart)
Parameters
autoStart
bool
Returns
Remarks
Auto-start will be slower than a true-start. See more at https://flowent.friedsynapse.com/tips#h.s5cucrg5qyjc
SetDelay(float)
Sets the amount of time in seconds that you want to delay when this animation is started.
public AbstractAnimationOptions SetDelay(float time)
Parameters
time
float
Returns
SetDelayUntil(Func<bool>)
Sets the callback that holds the starting of the animation.
public AbstractAnimationOptions SetDelayUntil(Func<bool> callback)
Parameters
Returns
SetLoopCount(int?)
Sets the amount of loops you want this animation to have. If you want infinite loops pass a null value.
public AbstractAnimationOptions SetLoopCount(int? loopCount)
Parameters
loopCount
int?
Returns
Remarks
Flows only have reset loop types.
SetName(string)
Sets the name of the animation.
public AbstractAnimationOptions SetName(string name)
Parameters
name
string
Returns
SetSkipFrames(int)
Sets the amount of frames you want to skip at when this animation is started.
public AbstractAnimationOptions SetSkipFrames(int frames)
Parameters
frames
int
Returns
SetTimeScale(float)
Sets the time scale for the current animation.
public AbstractAnimationOptions SetTimeScale(float timeScale)
Parameters
timeScale
float
Returns
SetUpdateType(UpdateType)
Sets the update type for the animation.
public AbstractAnimationOptions SetUpdateType(UpdateType updateType)
Parameters
updateType
UpdateType