Adds an Animation component to a Sprite and populates it based on the given config.
name | type | description |
---|---|---|
sprite | Phaser.GameObjects.Sprite |
The sprite to add an Animation component to. |
config | object |
The animation config. |
The updated Sprite.