SinglePad#destroy()

destroy() Destroys this object and associated callback references. Source code: input/SinglePad.js (Line 298)

SinglePad#disconnect()

disconnect() Gamepad disconnect function, should be called by Phaser.Gamepad. Source code: input/SinglePad.js (Line 260)

SinglePad#game

game : Phaser.Game Local reference to game. Source code: input/SinglePad.js (Line 21)

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 Phaser.DeviceButton - The DeviceButton object which you can store locally and reference directly. Source code: input/SinglePad.js

SinglePad#index

[readonly] index : number The gamepad index as per browsers data Source code: input/SinglePad.js (Line 27)

SinglePad#isDown()

isDown(buttonCode) → {boolean} Returns true if the button is pressed down. Parameters Name Type Description buttonCode number The buttonCode of the button to check. Returns boolean - True if the button is pressed down. Source code: input/SinglePad.js (Line 450)

SinglePad#isUp()

isUp(buttonCode) → {boolean} Returns true if the button is not currently pressed. Parameters Name Type Description buttonCode number The buttonCode of the button to check. Returns boolean - True if the button is not currently pressed down. Source code: input/SinglePad.js (Line 468)

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 ju

SinglePad#justReleased()

justReleased(buttonCode, duration) → {boolean} Returns the "just released" state of a button from this gamepad. Just released is considered as being true if the button was released 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 released. Returns boolean - True if the but

SinglePad#onAxisCallback

onAxisCallback : Function This callback is invoked every time an axis is changed. Source code: input/SinglePad.js (Line 63)