Cache#getFrameCount()

getFrameCount(key, cache) → {number} Get the total number of frames contained in the FrameData object specified by the given key. Parameters Name Type Argument Default Description key string Asset key of the FrameData you want. cache integer <optional> Phaser.Cache.IMAGE The cache to search for the item in. Returns number - Then number of frames. 0 if the image is not found. Source code: loader/Cache.js (Line 1458)

Cache#getFrameByName()

getFrameByName(key, name, cache) → {Phaser.Frame} Get a single frame out of a frameData set by key. Parameters Name Type Argument Default Description key string Asset key of the frame data to retrieve from the Cache. name string The name of the frame you want to get. cache integer <optional> Phaser.Cache.IMAGE The cache to search. One of the Cache consts such as Phaser.Cache.IMAGE or Phaser.Cache.SOUND. Returns Phaser.Frame - The frame object. Source code: load

Cache#getFrameByIndex()

getFrameByIndex(key, index, cache) → {Phaser.Frame} Get a single frame out of a frameData set by key. Parameters Name Type Argument Default Description key string Asset key of the frame data to retrieve from the Cache. index number The index of the frame you want to get. cache integer <optional> Phaser.Cache.IMAGE The cache to search. One of the Cache consts such as Phaser.Cache.IMAGE or Phaser.Cache.SOUND. Returns Phaser.Frame - The frame object. Source code:

Cache#getFrame()

getFrame(key, cache) → {Phaser.Frame} Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image. Parameters Name Type Argument Default Description key string Asset key of the frame data to retrieve from the Cache. cache integer <optional> Phaser.Cache.IMAGE The cache to search for the item in. Returns Phaser.Frame - The frame data. Source code: loader/Cache.js (Line 1442)

Cache#getCanvas()

getCanvas(key) → {object} Gets a Canvas object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Description key string The key of the asset to retrieve from the cache. Returns object - The canvas object or null if no item could be found matching the given key. Source code: loader/Cache.js (Line 1061)

Cache#getBitmapFont()

getBitmapFont(key) → {Phaser.BitmapFont} Gets a Bitmap Font object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Description key string The key of the asset to retrieve from the cache. Returns Phaser.BitmapFont - The requested BitmapFont object if found, or null if not. Source code: loader/Cache.js (Line 1300)

Cache#getBitmapData()

getBitmapData(key) → {Phaser.BitmapData} Gets a BitmapData object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Description key string The key of the asset to retrieve from the cache. Returns Phaser.BitmapData - The requested BitmapData object if found, or null if not. Source code: loader/Cache.js (Line 1283)

Cache#getBinary()

getBinary(key) → {object} Gets a binary object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Description key string The key of the asset to retrieve from the cache. Returns object - The binary data object. Source code: loader/Cache.js (Line 1266)

Cache#getBaseTexture()

getBaseTexture(key, cache) → {PIXI.BaseTexture} Gets a PIXI.BaseTexture by key from the given Cache. Parameters Name Type Argument Default Description key string Asset key of the image for which you want the BaseTexture for. cache integer <optional> Phaser.Cache.IMAGE The cache to search for the item in. Returns PIXI.BaseTexture - The BaseTexture object. Source code: loader/Cache.js (Line 1426)

Cache#game

game : Phaser.Game Local reference to game. Source code: loader/Cache.js (Line 39)