Gamepad#justPressed()

justPressed(buttonCode, duration) → {boolean}

Returns the "just released" state of a button from ANY gamepad connected. Just released is considered as being true if the button was released within the duration given (default 250ms).

Parameters
Name Type Argument Default Description
buttonCode number

The buttonCode of the button to check for.

duration number <optional>
250

The duration below which the button is considered as being just released.

Returns
boolean -

True if the button is just released otherwise false.

Source code: input/Gamepad.js (Line 436)
doc_phaser
2017-02-14 10:48:54
Comments
Leave a Comment

Please login to continue.