Whether or not to poll for Gamepad input (default: false
)
Direct access to the game object event dispatcher.
Whether or not Gamepad API is supported
The minimum value an axis has to move before considering it a change
Safely retrieves a Gamepad at a specific index and creates one if it doesn't yet exist
Gets the number of connected gamepads
Emits a new event
Name of the event to emit
Data associated with this event
Returns a list of all valid gamepads that meet the minimum configuration requirement.
Alias for removeEventListener
. If only the eventName is specified
it will remove all handlers registered for that specific event. If the eventName
and the handler instance are specified only that handler will be removed.
Alias for addEventListener
. You can listen for a variety of
events off of the engine; see the events section below for a complete list.
Once listens to an event one time, then unsubscribes from that event
The name of the event to subscribe to once
The handler of the event that will be auto unsubscribed
Sets the minimum gamepad configuration, for example {axis: 4, buttons: 4} means this game requires at minimum 4 axis inputs and 4 buttons, this is not restrictive all other controllers with more axis or buttons are valid as well. If no minimum configuration is set all pads are valid.
Updates Gamepad state and publishes Gamepad events
Excalibur leverages the HTML5 Gamepad API where it is supported to provide controller support for your games.