IAnimationWithEventsExtensions.Loop
Loop<T>(T, float, int)
Queue an animation to loop iterations
times for durationInSeconds
per iteration, where
indicates "until canceled", starting at the end of the current frame.iterations
== -1
Declaration
public static AnimationHandle Loop<T>(this T animation, float durationInSeconds, int iterations = -1)
where T : struct, IAnimationWithEvents
Parameters
Type | Name | Description |
---|---|---|
T | animation | The IAnimation struct configured to perform the animation via Nova.IAnimation.Update(float) |
float | durationInSeconds | The duration, in seconds, per iteration of the animation |
int | iterations | The number of iterations to perform before the animation is removed from the animation queue. |
Returns
Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AnimationHandle | An AnimationHandle, which can be used to:
|
Type Parameters
Name | Description |
---|---|
T | The type of the |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Throws when |