phaser/v3/typings/input/keyboard/state/DownDuration.d.ts

10 lines
476 B
TypeScript
Raw Normal View History

2017-01-16 21:43:07 +00:00
/**
* 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.
*/
export default function (key: any, duration: any): boolean;