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)
Please login to continue.