Contains information about a specific button on a Gamepad. Button objects are created automatically by the Gamepad as they are needed.
new Button(pad, index)
name | type | description |
---|---|---|
pad | Phaser.Input.Gamepad.Gamepad |
A reference to the Gamepad that this Button belongs to. |
index | number |
The index of this Button. |
An event emitter to use to emit the button events.
The index of this Button.
A reference to the Gamepad that this Button belongs to.
Is the Button being pressed down or not?
Can be set for analogue buttons to enable a 'pressure' threshold, before a button is considered as being 'pressed'.
Between 0 and 1.
Destroys this Button instance and releases external references it holds.