FREE TRIAL

|

☀
☾

IAnimationExtensions.Loop

Loop<T>(T, float, int)

Queue an animation to loop iterations times for durationInSeconds per iteration, where iterations == -1 indicates "until canceled", starting at the end of the current frame.

Declaration
public static AnimationHandle Loop<T>(this T animation, float durationInSeconds, int iterations = -1)
    where T : struct, IAnimation
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. -1 indicates "infinite iterations"

Returns
Type Description
AnimationHandle

An AnimationHandle, which can be used to:

ChainNova.AnimationHandleExtensions.Chain``1(Nova.AnimationHandle,``0,float,int)
IncludeInclude<T>(AnimationHandle, T)
PausePause(AnimationHandle)
ResumeResume(AnimationHandle)
CancelCancel(AnimationHandle)
CompleteComplete(AnimationHandle)
Type Parameters
Name Description
T

The type of the animation struct

Exceptions
Type Condition
System.ArgumentException

Throws when durationInSeconds is invalid.

☀
☾
IAnimationExtensions.Loop
  • Loop<T>(T, float, int)
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC