Phaser API Documentation

  Version: 

Member of: Phaser.Actions

<static> PlayAnimation(items, key, [startFrame])

Description:

Play an animation with the given key, starting at the given startFrame on all Game Objects in items.

Parameters:

name type arguments description
items array | Array.<Phaser.GameObjects.GameObject>

An array of Game Objects. The contents of this array are updated by this Action.

key string

The name of the animation to play.

startFrame string | number <optional>

The starting frame of the animation with the given key.

Returns:
Description:

The array of Game Objects that was passed to this Action.

Type:
Since: 3.0.0