Phaser API Documentation

  Version: 

Member of: Phaser.GameObjects

<static> BuildGameObjectAnimation(sprite, config)

Description:

Adds an Animation component to a Sprite and populates it based on the given config.

Parameters:

name type description
sprite Phaser.GameObjects.Sprite

The sprite to add an Animation component to.

config object

The animation config.

Returns:
Description:

The updated Sprite.

Since: 3.0.0