Merge pull request #2868 from hilts-vaughan/issue-2806

Keys: Fixed an issue where the name annotations were missing on some …
This commit is contained in:
Richard Davey 2016-11-23 03:25:04 +00:00 committed by GitHub
commit 34080eda6f

View file

@ -6,7 +6,7 @@
/**
* If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.
*
*
* @class Phaser.Key
* @constructor
* @param {Phaser.Game} game - Current game instance.
@ -130,7 +130,7 @@ Phaser.Key.prototype = {
/**
* Called automatically by Phaser.Keyboard.
*
*
* @method Phaser.Key#update
* @protected
*/
@ -153,7 +153,7 @@ Phaser.Key.prototype = {
/**
* Called automatically by Phaser.Keyboard.
*
*
* @method Phaser.Key#processKeyDown
* @param {KeyboardEvent} event - The DOM event that triggered this.
* @protected
@ -190,7 +190,7 @@ Phaser.Key.prototype = {
/**
* Called automatically by Phaser.Keyboard.
*
*
* @method Phaser.Key#processKeyUp
* @param {KeyboardEvent} event - The DOM event that triggered this.
* @protected
@ -253,7 +253,7 @@ Phaser.Key.prototype = {
/**
* Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,
* or was pressed down longer ago than then given duration.
*
*
* @method Phaser.Key#downDuration
* @param {number} [duration=50] - The duration within which the key is considered as being just pressed. Given in ms.
* @return {boolean} True if the key was pressed down within the given duration.
@ -269,7 +269,7 @@ Phaser.Key.prototype = {
/**
* Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,
* or was pressed down longer ago than then given duration.
*
*
* @method Phaser.Key#upDuration
* @param {number} [duration=50] - The duration within which the key is considered as being just released. Given in ms.
* @return {boolean} True if the key was released within the given duration.
@ -289,7 +289,8 @@ Phaser.Key.prototype = {
* When you check this value it will return `true` if the Key is down, otherwise `false`.
* You can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again.
* This allows you to use it in situations where you want to check if this key is down without using a Signal, such as in a core game loop.
*
*
* @name Phaser.Key#justDown
* @property {boolean} justDown
* @memberof Phaser.Key
* @default false
@ -311,7 +312,8 @@ Object.defineProperty(Phaser.Key.prototype, "justDown", {
* When you check this value it will return `true` if the Key is up, otherwise `false`.
* You can only call justUp once per key release. It will only return `true` once, until the Key is pressed down and released again.
* This allows you to use it in situations where you want to check if this key is up without using a Signal, such as in a core game loop.
*
*
* @name Phaser.Key#justUp
* @property {boolean} justUp
* @memberof Phaser.Key
* @default false
@ -331,7 +333,7 @@ Object.defineProperty(Phaser.Key.prototype, "justUp", {
/**
* An enabled key processes its update and dispatches events.
* A key can be disabled momentarily at runtime instead of deleting it.
*
* @name Phaser.Key#enabled
* @property {boolean} enabled
* @memberof Phaser.Key
* @default true