mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
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:
commit
34080eda6f
1 changed files with 11 additions and 9 deletions
|
@ -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.
|
* If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.
|
||||||
*
|
*
|
||||||
* @class Phaser.Key
|
* @class Phaser.Key
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {Phaser.Game} game - Current game instance.
|
* @param {Phaser.Game} game - Current game instance.
|
||||||
|
@ -130,7 +130,7 @@ Phaser.Key.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called automatically by Phaser.Keyboard.
|
* Called automatically by Phaser.Keyboard.
|
||||||
*
|
*
|
||||||
* @method Phaser.Key#update
|
* @method Phaser.Key#update
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
|
@ -153,7 +153,7 @@ Phaser.Key.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called automatically by Phaser.Keyboard.
|
* Called automatically by Phaser.Keyboard.
|
||||||
*
|
*
|
||||||
* @method Phaser.Key#processKeyDown
|
* @method Phaser.Key#processKeyDown
|
||||||
* @param {KeyboardEvent} event - The DOM event that triggered this.
|
* @param {KeyboardEvent} event - The DOM event that triggered this.
|
||||||
* @protected
|
* @protected
|
||||||
|
@ -190,7 +190,7 @@ Phaser.Key.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called automatically by Phaser.Keyboard.
|
* Called automatically by Phaser.Keyboard.
|
||||||
*
|
*
|
||||||
* @method Phaser.Key#processKeyUp
|
* @method Phaser.Key#processKeyUp
|
||||||
* @param {KeyboardEvent} event - The DOM event that triggered this.
|
* @param {KeyboardEvent} event - The DOM event that triggered this.
|
||||||
* @protected
|
* @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,
|
* 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.
|
* or was pressed down longer ago than then given duration.
|
||||||
*
|
*
|
||||||
* @method Phaser.Key#downDuration
|
* @method Phaser.Key#downDuration
|
||||||
* @param {number} [duration=50] - The duration within which the key is considered as being just pressed. Given in ms.
|
* @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.
|
* @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,
|
* 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.
|
* or was pressed down longer ago than then given duration.
|
||||||
*
|
*
|
||||||
* @method Phaser.Key#upDuration
|
* @method Phaser.Key#upDuration
|
||||||
* @param {number} [duration=50] - The duration within which the key is considered as being just released. Given in ms.
|
* @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.
|
* @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`.
|
* 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.
|
* 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.
|
* 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
|
* @property {boolean} justDown
|
||||||
* @memberof Phaser.Key
|
* @memberof Phaser.Key
|
||||||
* @default false
|
* @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`.
|
* 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.
|
* 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.
|
* 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
|
* @property {boolean} justUp
|
||||||
* @memberof Phaser.Key
|
* @memberof Phaser.Key
|
||||||
* @default false
|
* @default false
|
||||||
|
@ -331,7 +333,7 @@ Object.defineProperty(Phaser.Key.prototype, "justUp", {
|
||||||
/**
|
/**
|
||||||
* An enabled key processes its update and dispatches events.
|
* An enabled key processes its update and dispatches events.
|
||||||
* A key can be disabled momentarily at runtime instead of deleting it.
|
* A key can be disabled momentarily at runtime instead of deleting it.
|
||||||
*
|
* @name Phaser.Key#enabled
|
||||||
* @property {boolean} enabled
|
* @property {boolean} enabled
|
||||||
* @memberof Phaser.Key
|
* @memberof Phaser.Key
|
||||||
* @default true
|
* @default true
|
||||||
|
|
Loading…
Reference in a new issue