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#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#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#index

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

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#game

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

SinglePad#disconnect()

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

SinglePad#destroy()

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

SinglePad#deadZone

deadZone : number Dead zone for axis feedback - within this value you won't trigger updates. Source code: input/SinglePad.js (Line 73)

SinglePad#connected

[readonly] connected : boolean Whether or not this particular gamepad is connected or not. Source code: input/SinglePad.js (Line 33)