Updated documentation.

This commit is contained in:
photonstorm
2013-11-28 15:57:09 +00:00
parent 8da9b67c18
commit f22159e257
193 changed files with 68905 additions and 93104 deletions
+95 -27
View File
@@ -54,6 +54,10 @@
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li>
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
@@ -138,6 +142,10 @@
<a href="Phaser.Events.html">Events</a>
</li>
<li>
<a href="Phaser.Filter.html">Filter</a>
</li>
<li>
<a href="Phaser.Frame.html">Frame</a>
</li>
@@ -302,6 +310,26 @@
<a href="Phaser.Text.html">Text</a>
</li>
<li>
<a href="Phaser.Tile.html">Tile</a>
</li>
<li>
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li>
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li>
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li>
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
@@ -310,6 +338,10 @@
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -356,6 +388,14 @@
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
</li>
@@ -381,14 +421,16 @@
<section>
<article>
<pre class="sunlight-highlight-javascript linenums">/**
<pre class="sunlight-highlight-javascript linenums">/* jshint newcap: false */
/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Description.
* The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.
*
* @class Phaser.PluginManager
* @classdesc Phaser - PluginManager
@@ -398,27 +440,27 @@
*/
Phaser.PluginManager = function(game, parent) {
/**
* @property {Phaser.Game} game - A reference to the currently running game.
*/
/**
* @property {Phaser.Game} game - A reference to the currently running game.
*/
this.game = game;
/**
* @property {Description} _parent - Description.
* @private
*/
* @property {Description} _parent - Description.
* @private
*/
this._parent = parent;
/**
* @property {array} plugins - Description.
*/
* @property {array} plugins - Description.
*/
this.plugins = [];
/**
* @property {array} _pluginsLength - Description.
* @private
* @default
*/
* @property {array} _pluginsLength - Description.
* @private
* @default
*/
this._pluginsLength = 0;
};
@@ -481,7 +523,7 @@ Phaser.PluginManager.prototype = {
// The plugin must have at least one of the above functions to be added to the PluginManager.
if (result)
{
if (plugin.hasPreUpdate || plugin.hasUpdate)
if (plugin.hasPreUpdate || plugin.hasUpdate || plugin.hasPostUpdate)
{
plugin.active = true;
}
@@ -508,15 +550,41 @@ Phaser.PluginManager.prototype = {
},
/**
* Remove a Plugin from the PluginManager.
* @method Phaser.PluginManager#remove
* @param {Phaser.Plugin} plugin - The plugin to be removed.
*/
* Remove a Plugin from the PluginManager.
* @method Phaser.PluginManager#remove
* @param {Phaser.Plugin} plugin - The plugin to be removed.
*/
remove: function (plugin) {
if (this._pluginsLength === 0)
{
return;
}
// TODO
this._pluginsLength--;
for (this._p = 0; this._p &lt; this._pluginsLength; this._p++)
{
if (this.plugins[this._p] === plugin)
{
plugin.destroy();
this.plugins.splice(this._p, 1);
this._pluginsLength--;
return;
}
}
},
/**
* Removes all Plugins from the PluginManager.
* @method Phaser.PluginManager#removeAll
*/
removeAll: function() {
for (this._p = 0; this._p &lt; this._pluginsLength; this._p++)
{
this.plugins[this._p].destroy();
}
this.plugins.length = 0;
this._pluginsLength = 0;
},
/**
@@ -527,7 +595,7 @@ Phaser.PluginManager.prototype = {
*/
preUpdate: function () {
if (this._pluginsLength == 0)
if (this._pluginsLength === 0)
{
return;
}
@@ -550,7 +618,7 @@ Phaser.PluginManager.prototype = {
*/
update: function () {
if (this._pluginsLength == 0)
if (this._pluginsLength === 0)
{
return;
}
@@ -574,7 +642,7 @@ Phaser.PluginManager.prototype = {
*/
postUpdate: function () {
if (this._pluginsLength == 0)
if (this._pluginsLength === 0)
{
return;
}
@@ -597,7 +665,7 @@ Phaser.PluginManager.prototype = {
*/
render: function () {
if (this._pluginsLength == 0)
if (this._pluginsLength === 0)
{
return;
}
@@ -620,7 +688,7 @@ Phaser.PluginManager.prototype = {
*/
postRender: function () {
if (this._pluginsLength == 0)
if (this._pluginsLength === 0)
{
return;
}
@@ -671,7 +739,7 @@ Phaser.PluginManager.prototype = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 07 2013 06:07:33 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>