SinglePad#buttonValue()

buttonValue(buttonCode) → {number}

Returns the value of a gamepad button. Intended mainly for cases when you have floating button values, for example
analog trigger buttons on the XBOX 360 controller.

Parameters
Name Type Description
buttonCode number

The buttonCode of the button to check.

Returns
number -

Button value if available otherwise null. Be careful as this can incorrectly evaluate to 0.

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

Please login to continue.