Phaser API Documentation

  Version: 
stopAfterRepeat([repeatCount])

Description:

Stops the current animation from playing after the given number of repeats.

It then dispatches the ANIMATION_STOP event.

If no animation is running, no events will be dispatched.

If there is another animation in the queue (set via the chain method) then it will start playing, when the current one stops.

Parameters:

name type arguments Default description
repeatCount number <optional> 1

How many times should the animation repeat before stopping?

Returns:
Description:

This Game Object.

Since: 3.50.0