If the gamepad input is active or not - if not active it should not be updated from Input.js
Add callbacks to the main Gamepad handler to handle connect/disconnect/button down/button up/axis change/float value buttons.
Add callbacks to the main Gamepad handler to handle connect/disconnect/button down/button up/axis change/float value buttons.
The context under which the callbacks are run.
Object that takes six different callback methods: onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback
The context under which the callbacks are run.
Destroys this object and the associated event listeners.
Gamepad input will only be processed if enabled (default: true).
Returns true if the button is currently pressed down, on ANY gamepad.
Returns true if the button is currently pressed down, on ANY gamepad.
The buttonCode of the button to check for.
True if a button is currently down.
Returns the "just released" state of a button from ANY gamepad connected.
Returns the "just released" state of a button from ANY gamepad connected. Just released is considered as being true if the button was released within the duration given (default 250ms).
The buttonCode of the button to check for.
The duration below which the button is considered as being just released.
True if the button is just released otherwise false.
This callback is invoked every time any gamepad axis is changed.
This callback is invoked every time any gamepad is disconnected
This callback is invoked every time any gamepad button is pressed down.
This callback is invoked every time any gamepad button is changed to a value where value > 0 and value < 1.
This callback is invoked every time any gamepad button is released.
Gamepad #1
Gamepad #2
Gamepad #3
Gamepad #4
How many live gamepads are currently connected.
Reset all buttons/axes of all gamepads
Sets the deadZone variable for all four gamepads
Starts the Gamepad event handling.
Starts the Gamepad event handling. This MUST be called manually before Phaser will start polling the Gamepad API.
Stops the Gamepad event handling.
Whether or not gamepads are supported in current browser.
The Gamepad class handles gamepad input and dispatches gamepad events.
Remember to call gamepad.start().
HTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE! At moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it via prefs flags (about:config, search gamepad). The browsers map the same controllers differently. This class has constants for Windows 7 Chrome mapping of XBOX 360 controller.
http://phaser.io/docs/2.6.2/Phaser.Gamepad.html