AnimationsHelper
This script allows a sequence of animations to be played.
Contents |
Public Variables
loop : LoopStyle
This is the way the animations will loop when it gets to the end of the list. It can have the following values:
None
The animations sequence will stop when it gets to the end of the list.
Loop
The animations sequence will start again from the beginning of the list.
PingPong
The animations sequence will go backwards through the list till it gets to the beginning, then start back forward again.
config : List<AnimationData>
This is the list of animations that will be played by this class. This is a list of classes that have the following definition:
public class AnimationData { public string clipName = ""; public float delay = 1.0f; public int playCount = -1; };
clipName : string
This is the name of the animation clip to play.
delay : float
This is how many seconds to delay before playing.
playCount : int
This is how many loops this should be included for. If it's negative, it will be included in all loops. Once the required number of loops is reached during runtime, the clip is dropped from the list.
index : int
This is the starting index into the list above. As the game is running, it is updated and represents the current index being played.
direction : int
This is the direction of where to find the next animation sequence in the list. Positive for forward, negative for backward.