Examples (audio, button,camera), and docs

Created some examples (audio, button,camera), and documented the source
code along the way
This commit is contained in:
Webeled
2013-09-16 16:37:30 +02:00
parent 17e208a95e
commit fc584cf6bc
15 changed files with 393 additions and 8 deletions
+9
View File
@@ -3,6 +3,15 @@
*
* A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view.
* The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y
*
* @class Phaser.Camera
* @constructor
* @param game {Phaser.Game} game reference to the currently running game.
* @param id {number} not being used at the moment, will be when Phaser supports multiple camera
* @param x {number} position of the camera on the X axis
* @param y {number} position of the camera on the Y axis
* @param width {number} the width of the view rectangle
* @param height {number} the height of the view rectangle
*/
Phaser.Camera = function (game, id, x, y, width, height) {
+7
View File
@@ -8,6 +8,13 @@
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License
* @class Phaser.Camera
* @constructor
* @param game {Phaser.Game} game reference to the currently running game.
* @param width {number} width of the canvas element
* @param height {number} height of the canvas element
*/
Phaser.Stage = function (game, width, height) {
+6 -1
View File
@@ -11,6 +11,10 @@
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License
* @class World
* @constructor
* @param game {Phaser.Game} reference to the current game instance.
*/
Phaser.World = function (game) {
@@ -91,7 +95,7 @@ Phaser.World.prototype = {
/**
* Updates the size of this world.
*
* @method setSize
* @param width {number} New width of the world.
* @param height {number} New height of the world.
*/
@@ -111,6 +115,7 @@ Phaser.World.prototype = {
/**
* Destroyer of worlds.
* @method setSize
*/
destroy: function () {