More docs.

This commit is contained in:
Richard Davey
2013-10-02 12:11:22 +01:00
parent 2a01fbb0e8
commit 852e82d0ca
60 changed files with 39127 additions and 362 deletions
+22 -34
View File
@@ -2,11 +2,9 @@
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
* @module Phaser.World
*/
/**
*
* "This world is but a canvas to our imagination." - Henry David Thoreau
* <p>
* A game has only one world. The world is an abstract place in which all game objects live. It is not bound
@@ -51,7 +49,8 @@ Phaser.World.prototype = {
/**
* Initialises the game world.
*
* @method boot
* @method Phaser.World#boot
* @protected
*/
boot: function () {
@@ -66,7 +65,7 @@ Phaser.World.prototype = {
/**
* This is called automatically every frame, and is where main logic happens.
*
* @method update
* @method Phaser.World#update
*/
update: function () {
@@ -99,7 +98,7 @@ Phaser.World.prototype = {
/**
* This is called automatically every frame, and is where main logic happens.
* @method update
* @method Phaser.World#postUpdate
*/
postUpdate: function () {
@@ -123,7 +122,7 @@ Phaser.World.prototype = {
/**
* Updates the size of this world.
* @method setSize
* @method Phaser.World#setSize
* @param {number} width - New width of the world.
* @param {number} height - New height of the world.
*/
@@ -143,7 +142,7 @@ Phaser.World.prototype = {
/**
* Destroyer of worlds.
* @method destroy
* @method Phaser.World#destroy
*/
destroy: function () {
@@ -158,28 +157,16 @@ Phaser.World.prototype = {
};
// Getters / Setters
/**
* Get
* @returns {Description}
*//**
* Set
* @param {Description} value - Description
* @name Phaser.World#width
* @property {number} width - Gets or sets the current width of the game world.
*/
Object.defineProperty(Phaser.World.prototype, "width", {
/**
* @method width
* @return {number} The current width of the game world
*/
get: function () {
return this.bounds.width;
},
/**
* @method width
* @return {number} Sets the width of the game world
*/
set: function (value) {
this.bounds.width = value;
}
@@ -187,11 +174,8 @@ Object.defineProperty(Phaser.World.prototype, "width", {
});
/**
* Get
* @returns {number} The current height of the game world.
*//**
* Sets the width of the game world.
* @param {Description} value - Height of the game world.
* @name Phaser.World#height
* @property {number} height - Gets or sets the current height of the game world.
*/
Object.defineProperty(Phaser.World.prototype, "height", {
@@ -206,8 +190,9 @@ Object.defineProperty(Phaser.World.prototype, "height", {
});
/**
* Get
* @returns {number} return the X position of the center point of the world
* @name Phaser.World#centerX
* @property {number} centerX - Gets the X position corresponding to the center point of the world.
* @readonly
*/
Object.defineProperty(Phaser.World.prototype, "centerX", {
@@ -218,8 +203,9 @@ Object.defineProperty(Phaser.World.prototype, "centerX", {
});
/**
* Get
* @returns {number} return the Y position of the center point of the world
* @name Phaser.World#centerY
* @property {number} centerY - Gets the Y position corresponding to the center point of the world.
* @readonly
*/
Object.defineProperty(Phaser.World.prototype, "centerY", {
@@ -230,8 +216,9 @@ Object.defineProperty(Phaser.World.prototype, "centerY", {
});
/**
* Get
* @returns {number} a random integer which is lesser or equal to the current width of the game world
* @name Phaser.World#randomX
* @property {number} randomX - Gets a random integer which is lesser than or equal to the current width of the game world.
* @readonly
*/
Object.defineProperty(Phaser.World.prototype, "randomX", {
@@ -242,8 +229,9 @@ Object.defineProperty(Phaser.World.prototype, "randomX", {
});
/**
* Get
* @returns {number} a random integer which is lesser or equal to the current height of the game world
* @name Phaser.World#randomY
* @property {number} randomY - Gets a random integer which is lesser than or equal to the current height of the game world.
* @readonly
*/
Object.defineProperty(Phaser.World.prototype, "randomY", {