Phaser API Documentation

  Version: 
play(key, children)

Description:

Play an animation on the given Game Objects that have an Animation Component.

Parameters:

name type description
key string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig

The string-based key of the animation to play, or an Animation instance, or a PlayAnimationConfig object.

children Phaser.GameObjects.GameObject | Array.<Phaser.GameObjects.GameObject>

An array of Game Objects to play the animation on. They must have an Animation Component.

Returns:
Description:

This Animation Manager.

Since: 3.0.0