phaser/v3/typings/input/keyboard/state/JustDown.d.ts
2017-01-16 22:43:07 +01:00

11 lines
572 B
TypeScript

/**
* The justDown value allows you to test if this Key has just been pressed down or not.
* 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.
*
* @property {boolean} justDown
* @memberof Phaser.Key
* @default false
*/
export default function (key: any): boolean;