Direct access to the game object event dispatcher.
Emits a new event
Name of the event to emit
Data associated with this event
Gets the given axis value between -1 and 1. Values below MinAxisMoveThreshold are considered 0.
Gets the given button value between 0 and 1
Whether or not the given button is pressed
The button to query
The threshold over which the button is considered to be pressed
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.
Name of the event to listen for
Event handler for the thrown event
Alias for addEventListener
. You can listen for a variety of
events off of the engine; see the events section below for a complete list.
Name of the event to listen for
Event handler for the thrown event
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
Gamepad holds state information for a connected controller. See Gamepads for more information on handling controller input.