Keyboard#upDuration()

upDuration(keycode, duration) → {boolean}

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.

Parameters
Name Type Argument Default Description
keycode Phaser.KeyCode | integer

The keycode of the key to check, i.e. Phaser.KeyCode.UP or Phaser.KeyCode.SPACEBAR.

duration number <optional>
50

The duration within which the key is considered as being just released. Given in ms.

Returns
boolean -

True if the key was released within the given duration, false if not or null if the Key wasn't found.

Source code: input/Keyboard.js (Line 509)
doc_phaser
2017-02-14 10:53:54
Comments
Leave a Comment

Please login to continue.