Returns a Texture from the Texture Manager that matches the given key.
If the key is undefined
it will return the __DEFAULT
Texture.
If the key is an instance of a Texture, it will return the instance.
If the key is an instance of a Frame, it will return the frames parent Texture instance.
Finally, if the key is given, but not found, and not a Texture or Frame instance, it will return the __MISSING
Texture.
name | type | description |
---|---|---|
key | string | Phaser.Textures.Texture | Phaser.Textures.Frame |
The unique string-based key of the Texture, or a Texture, or Frame instance. |
The Texture matching the given key.