More docs coming on.

This commit is contained in:
Richard Davey
2013-10-01 16:39:39 +01:00
parent a38ad2d1a9
commit ca113b85aa
80 changed files with 10121 additions and 4763 deletions
+4 -4
View File
@@ -86,7 +86,7 @@ Phaser.Input.prototype = {
/**
* You can disable all Input by setting Input.disabled: true. While set all new input related events will be ignored.
* If you need to disable just one type of input, for example mouse, use Input.mouse.disabled: true instead
* @property {bool} disabled
* @property {boolean} disabled
* @default
*/
disabled: false,
@@ -182,7 +182,7 @@ Phaser.Input.prototype = {
* Sets if the Pointer objects should record a history of x/y coordinates they have passed through.
* The history is cleared each time the Pointer is pressed down.
* The history is updated at the rate specified in Input.pollRate
* @property {bool} recordPointerHistory
* @property {boolean} recordPointerHistory
* @default
**/
recordPointerHistory: false,
@@ -446,7 +446,7 @@ Phaser.Input.prototype = {
/**
* Reset all of the Pointers and Input states
* @method reset
* @param {bool} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will.
* @param {boolean} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will.
**/
reset: function (hard) {
@@ -597,7 +597,7 @@ Phaser.Input.prototype = {
/**
* Get the next Pointer object whos active property matches the given state
* @method getPointer
* @param {bool} state - The state the Pointer should be in (false for inactive, true for active).
* @param {boolean} state - The state the Pointer should be in (false for inactive, true for active).
* @return {Pointer} A Pointer object or null if no Pointer object matches the requested state.
**/
getPointer: function (state) {
+21 -21
View File
@@ -25,7 +25,7 @@ Phaser.InputHandler = function (sprite) {
this.sprite = sprite;
/**
* @property {bool} enabled - Description.
* @property {boolean} enabled - Description.
* @default
*/
this.enabled = false;
@@ -68,31 +68,31 @@ Phaser.InputHandler = function (sprite) {
this.priorityID = 0;
/**
* @property {bool} useHandCursor - Description.
* @property {boolean} useHandCursor - Description.
* @default
*/
this.useHandCursor = false;
/**
* @property {bool} isDragged - Description.
* @property {boolean} isDragged - Description.
* @default
*/
this.isDragged = false;
/**
* @property {bool} allowHorizontalDrag - Description.
* @property {boolean} allowHorizontalDrag - Description.
* @default
*/
this.allowHorizontalDrag = true;
/**
* @property {bool} allowVerticalDrag - Description.
* @property {boolean} allowVerticalDrag - Description.
* @default
*/
this.allowVerticalDrag = true;
/**
* @property {bool} bringToTop - Description.
* @property {boolean} bringToTop - Description.
* @default
*/
this.bringToTop = false;
@@ -104,13 +104,13 @@ Phaser.InputHandler = function (sprite) {
this.snapOffset = null;
/**
* @property {bool} snapOnDrag - Description.
* @property {boolean} snapOnDrag - Description.
* @default
*/
this.snapOnDrag = false;
/**
* @property {bool} snapOnRelease - Description.
* @property {boolean} snapOnRelease - Description.
* @default
*/
this.snapOnRelease = false;
@@ -140,7 +140,7 @@ Phaser.InputHandler = function (sprite) {
this.pixelPerfectAlpha = 255;
/**
* @property {bool} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no
* @property {boolean} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no
* @default
*/
this.draggable = false;
@@ -160,7 +160,7 @@ Phaser.InputHandler = function (sprite) {
/**
* If this object is set to consume the pointer event then it will stop all propogation from this object on.
* For example if you had a stack of 6 sprites with the same priority IDs and one consumed the event, none of the others would receive it.
* @property {bool} consumePointerEvent
* @property {boolean} consumePointerEvent
* @default
*/
this.consumePointerEvent = false;
@@ -197,7 +197,7 @@ Phaser.InputHandler.prototype = {
* Description.
* @method start
* @param {number} priority - Description.
* @param {bool} useHandCursor - Description.
* @param {boolean} useHandCursor - Description.
* @return {Phaser.Sprite} Description.
*/
start: function (priority, useHandCursor) {
@@ -348,7 +348,7 @@ Phaser.InputHandler.prototype = {
* If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true.
* @method pointerDown
* @param {Pointer} pointer
* @return {bool}
* @return {boolean}
*/
pointerDown: function (pointer) {
@@ -362,7 +362,7 @@ Phaser.InputHandler.prototype = {
* If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true
* @method pointerUp
* @param {Pointer} pointer
* @return {bool}
* @return {boolean}
*/
pointerUp: function (pointer) {
@@ -418,7 +418,7 @@ Phaser.InputHandler.prototype = {
* Is the Pointer outside of this Sprite?
* @method pointerOut
* @param {Pointer} pointer
* @return {bool}
* @return {boolean}
*/
pointerOut: function (pointer) {
@@ -474,7 +474,7 @@ Phaser.InputHandler.prototype = {
* Checks if the given pointer is over this Sprite.
* @method checkPointerOver
* @param {Pointer} pointer
* @return {bool}
* @return {boolean}
*/
checkPointerOver: function (pointer) {
@@ -513,7 +513,7 @@ Phaser.InputHandler.prototype = {
* @method checkPixel
* @param {Description} x - Description.
* @param {Description} y - Description.
* @return {bool}
* @return {boolean}
*/
checkPixel: function (x, y) {
@@ -696,7 +696,7 @@ Phaser.InputHandler.prototype = {
* Updates the Pointer drag on this Sprite.
* @method updateDrag
* @param {Pointer} pointer
* @return {bool}
* @return {boolean}
*/
updateDrag: function (pointer) {
@@ -741,7 +741,7 @@ Phaser.InputHandler.prototype = {
* @method justOver
* @param {Pointer} pointer
* @param {number} delay - The time below which the pointer is considered as just over.
* @return {bool}
* @return {boolean}
*/
justOver: function (pointer, delay) {
@@ -757,7 +757,7 @@ Phaser.InputHandler.prototype = {
* @method justOut
* @param {Pointer} pointer
* @param {number} delay - The time below which the pointer is considered as just out.
* @return {bool}
* @return {boolean}
*/
justOut: function (pointer, delay) {
@@ -773,7 +773,7 @@ Phaser.InputHandler.prototype = {
* @method justPressed
* @param {Pointer} pointer
* @param {number} delay - The time below which the pointer is considered as just over.
* @return {bool}
* @return {boolean}
*/
justPressed: function (pointer, delay) {
@@ -789,7 +789,7 @@ Phaser.InputHandler.prototype = {
* @method justReleased
* @param {Pointer} pointer
* @param {number} delay - The time below which the pointer is considered as just out.
* @return {bool}
* @return {boolean}
*/
justReleased: function (pointer, delay) {
+4 -4
View File
@@ -116,8 +116,8 @@ Phaser.Key.prototype = {
},
/**
* @param {Number} [duration]
* @return {bool}
* @param {number} [duration]
* @return {boolean}
*/
justPressed: function (duration) {
@@ -128,8 +128,8 @@ Phaser.Key.prototype = {
},
/**
* @param {Number} [duration]
* @return {bool}
* @param {number} [duration]
* @return {boolean}
*/
justReleased: function (duration) {
+4 -4
View File
@@ -58,7 +58,7 @@ Phaser.Keyboard.prototype = {
/**
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
* @default
* @property {bool} disabled
* @property {boolean} disabled
*/
disabled: false,
@@ -284,7 +284,7 @@ Phaser.Keyboard.prototype = {
* @method justPressed
* @param {number} keycode
* @param {number} [duration]
* @return {bool}
* @return {boolean}
*/
justPressed: function (keycode, duration) {
@@ -304,7 +304,7 @@ Phaser.Keyboard.prototype = {
* @method justReleased
* @param {number} keycode
* @param {number} [duration]
* @return {bool}
* @return {boolean}
*/
justReleased: function (keycode, duration) {
@@ -323,7 +323,7 @@ Phaser.Keyboard.prototype = {
* Description.
* @method isDown
* @param {number} keycode
* @return {bool}
* @return {boolean}
*/
isDown: function (keycode) {
+1 -1
View File
@@ -57,7 +57,7 @@ Phaser.MSPointer.prototype = {
/**
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
* @property {bool} disabled
* @property {boolean} disabled
*/
disabled: false,
+2 -2
View File
@@ -59,14 +59,14 @@ Phaser.Mouse.prototype = {
/**
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
* @property {bool} disabled
* @property {boolean} disabled
* @default
*/
disabled: false,
/**
* If the mouse has been Pointer Locked successfully this will be set to true.
* @property {bool} locked
* @property {boolean} locked
* @default
*/
locked: false,
+10 -10
View File
@@ -18,7 +18,7 @@ Phaser.Pointer = function (game, id) {
/**
* Local private variable to store the status of dispatching a hold event.
* @property {bool} _holdSent
* @property {boolean} _holdSent
* @private
* @default
*/
@@ -41,7 +41,7 @@ Phaser.Pointer = function (game, id) {
/**
* Monitor events outside of a state reset loop.
* @property {bool} _stateReset
* @property {boolean} _stateReset
* @private
* @default
*/
@@ -71,7 +71,7 @@ Phaser.Pointer = function (game, id) {
/**
* Description.
* @property {bool} withinGame
* @property {boolean} withinGame
*/
this.withinGame = false;
@@ -133,21 +133,21 @@ Phaser.Pointer = function (game, id) {
/**
* If the Pointer is a mouse this is true, otherwise false.
* @property {bool} isMouse
* @type {bool}
* @property {boolean} isMouse
* @type {boolean}
*/
this.isMouse = false;
/**
* If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true.
* @property {bool} isDown
* @property {boolean} isDown
* @default
*/
this.isDown = false;
/**
* If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true.
* @property {bool} isUp
* @property {boolean} isUp
* @default
*/
this.isUp = true;
@@ -206,7 +206,7 @@ Phaser.Pointer = function (game, id) {
/**
* Description.
* @property {bool} isDown - Description.
* @property {boolean} isDown - Description.
* @default
*/
this.active = false;
@@ -575,7 +575,7 @@ Phaser.Pointer.prototype = {
* The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate.
* @method justPressed
* @param {number} [duration]
* @return {bool}
* @return {boolean}
*/
justPressed: function (duration) {
@@ -589,7 +589,7 @@ Phaser.Pointer.prototype = {
* The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate.
* @method justReleased
* @param {number} [duration]
* @return {bool}
* @return {boolean}
*/
justReleased: function (duration) {
+2 -2
View File
@@ -67,7 +67,7 @@ Phaser.Touch = function (game) {
this.touchCancelCallback = null;
/**
* @property {bool} preventDefault - Description.
* @property {boolean} preventDefault - Description.
* @default
*/
this.preventDefault = true;
@@ -81,7 +81,7 @@ Phaser.Touch.prototype = {
/**
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
* @method disabled
* @return {bool}
* @return {boolean}
*/
disabled: false,