mirror of
https://github.com/wassname/phaser.git
synced 2026-07-19 11:26:26 +08:00
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:
@@ -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) {
|
||||
|
||||
@@ -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
@@ -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 () {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user