Instance Method

repeat(duration:)

Repeats an animation for the specified amount of time.

Declaration

func `repeat`(duration: TimeInterval = .infinity) -> AnimationResource

Parameters

duration

The amount of time that the animation should play. If you omit this parameter, the animation loops indefinitely.

Return Value

A new animation resource that you play on an entity by calling the entity’s playAnimation(_:transitionDuration:startsPaused:) method.

See Also

Looping an Animation

func `repeat`(count: Int) -> AnimationResource

Repeats an animation the specified number of times.