SinglePad#justPressed()

justPressed(buttonCode, duration) → {boolean}

Returns the "just pressed" state of a button from this gamepad. Just pressed is considered true if the button was pressed down 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 pressed.

Returns
boolean -

True if the button is just pressed otherwise false.

Source code: input/SinglePad.js (Line 503)
doc_phaser
2017-02-14 11:09:36
Comments
Leave a Comment

Please login to continue.