Phaser API Documentation

  Version: 
exists(key)

Description:

Checks to see if the given key is already in use within the Animation Manager or not.

Animations are global. Keys created in one scene can be used from any other Scene in your game. They are not Scene specific.

Parameters:

name type description
key string

The key of the Animation to check.

Returns:
Description:

true if the Animation already exists in the Animation Manager, or false if the key is available.

Type:
  • boolean
Since: 3.16.0