Phaser API Documentation

  Version: 
repeat: number

Description:

The number of times to repeat playback of the current animation.

If -1, it means the animation will repeat forever.

This value is set when a new animation is loaded into this component and should be treated as read-only, as changing it once playback has started will not alter the animation. To change the number of repeats, provide a new value in the PlayAnimationConfig object.

Prior to Phaser 3.50 this property was private and called _repeat.

Type:
number
Default: 0
Since: 3.50.0