mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Updating docs
This commit is contained in:
parent
1d23aad976
commit
19a17bcf63
4 changed files with 40 additions and 1 deletions
|
@ -65,6 +65,7 @@ var EventEmitter = new Class({
|
|||
* Return an array listing the events for which the emitter has registered listeners.
|
||||
*
|
||||
* @method EventEmitter#eventNames
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @return {array}
|
||||
*/
|
||||
|
@ -73,6 +74,7 @@ var EventEmitter = new Class({
|
|||
* Return the listeners registered for a given event.
|
||||
*
|
||||
* @method EventEmitter#listeners
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} event - The event name.
|
||||
*
|
||||
|
@ -83,6 +85,7 @@ var EventEmitter = new Class({
|
|||
* Return the number of listeners listening to a given event.
|
||||
*
|
||||
* @method EventEmitter#listenerCount
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} event - The event name.
|
||||
*
|
||||
|
@ -93,6 +96,7 @@ var EventEmitter = new Class({
|
|||
* Calls each of the listeners registered for a given event.
|
||||
*
|
||||
* @method EventEmitter#emit
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} event - The event name.
|
||||
*
|
||||
|
@ -103,6 +107,7 @@ var EventEmitter = new Class({
|
|||
* Add a listener for a given event.
|
||||
*
|
||||
* @method EventEmitter#on
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} event - The event name.
|
||||
* @param {function} fn - The listener function.
|
||||
|
@ -115,6 +120,7 @@ var EventEmitter = new Class({
|
|||
* Add a listener for a given event.
|
||||
*
|
||||
* @method EventEmitter#addListener
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} event - The event name.
|
||||
* @param {function} fn - The listener function.
|
||||
|
@ -127,6 +133,7 @@ var EventEmitter = new Class({
|
|||
* Add a one-time listener for a given event.
|
||||
*
|
||||
* @method EventEmitter#once
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} event - The event name.
|
||||
* @param {function} fn - The listener function.
|
||||
|
@ -139,6 +146,7 @@ var EventEmitter = new Class({
|
|||
* Remove the listeners of a given event.
|
||||
*
|
||||
* @method EventEmitter#removeListener
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} event - The event name.
|
||||
* @param {function} fn - Only remove the listeners that match this function.
|
||||
|
@ -152,6 +160,7 @@ var EventEmitter = new Class({
|
|||
* Remove the listeners of a given event.
|
||||
*
|
||||
* @method EventEmitter#off
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} event - The event name.
|
||||
* @param {function} fn - Only remove the listeners that match this function.
|
||||
|
@ -165,6 +174,7 @@ var EventEmitter = new Class({
|
|||
* Remove all listeners, or those of the specified event.
|
||||
*
|
||||
* @method EventEmitter#removeAllListeners
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|symbol} [event] - The event name.
|
||||
*
|
||||
|
|
|
@ -4,7 +4,16 @@
|
|||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
* @function GetBitmapTextSize
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*
|
||||
* @param {Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText} src - [description]
|
||||
* @param {boolean} round - [description]
|
||||
*/
|
||||
var GetBitmapTextSize = function (src, round)
|
||||
{
|
||||
var text = src.text;
|
||||
|
|
|
@ -4,11 +4,26 @@
|
|||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @function getValue
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*/
|
||||
function getValue (node, attribute)
|
||||
{
|
||||
return parseInt(node.getAttribute(attribute), 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* @function ParseXMLBitmapFont
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*
|
||||
* @param {[type]} xml - [description]
|
||||
* @param {integer} xSpacing - [description]
|
||||
* @param {integer} ySpacing - [description]
|
||||
* @param {[type]} frame - [description]
|
||||
*/
|
||||
var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame)
|
||||
{
|
||||
if (xSpacing === undefined) { xSpacing = 0; }
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @function GetColor
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*/
|
||||
var GetColor = function (value)
|
||||
{
|
||||
return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);
|
||||
|
|
Loading…
Reference in a new issue