Added a Sample Plugin and tested out the Plugin Manager. Working great :)

This commit is contained in:
Richard Davey
2013-09-11 17:32:53 +01:00
parent fba731e740
commit 95374339b9
8 changed files with 631 additions and 891 deletions
+30
View File
@@ -330,6 +330,36 @@ Phaser.Cache.prototype = {
return null;
},
/**
* Get a single frame out of a frameData set by key.
* @param key Asset key of the frame data you want.
* @return {object} The frame data you want.
*/
getFrameByIndex: function (key, frame) {
if (this._images[key] && this._images[key].frameData)
{
return this._images[key].frameData.getFrame(frame);
}
return null;
},
/**
* Get a single frame out of a frameData set by key.
* @param key Asset key of the frame data you want.
* @return {object} The frame data you want.
*/
getFrameByName: function (key, frame) {
if (this._images[key] && this._images[key].frameData)
{
return this._images[key].frameData.getFrameByName(frame);
}
return null;
},
/**
* Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.
* @param key Asset key of the frame data you want.