Phaser API Documentation

  Version: 
remove(key)

Description:

Removes a locally created Animation from this Sprite, based on the given key.

Once an Animation has been removed, this Sprite cannot play it again without re-creating it.

Parameters:

name type description
key string

The key of the animation to remove.

Returns:
Description:

The Animation instance that was removed from this Sprite, if the key was valid.

Since: 3.50.0