Creature#key

key : string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture

The key of the image or texture used by this Game Object during rendering.
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.
If a Game Object is created without a key it is automatically assigned the key __default which is a 32x32 transparent PNG stored within the Cache.
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key __missing which is a 32x32 PNG of a green box with a line through it.

Type
Inherited From
Source code: gameobjects/components/Core.js (Line 203)
doc_phaser
2017-02-14 10:43:35
Comments
Leave a Comment

Please login to continue.