SinglePad#getButton()

getButton(buttonCode) → {Phaser.DeviceButton}

Gets a DeviceButton object from this controller to be stored and referenced locally.
The DeviceButton object can then be polled, have events attached to it, etc.

Parameters
Name Type Description
buttonCode number

The buttonCode of the button, i.e. Phaser.Gamepad.BUTTON_0, Phaser.Gamepad.XBOX360_A, etc.

Returns

The DeviceButton object which you can store locally and reference directly.

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

Please login to continue.