Gamepad#addCallbacks()

addCallbacks(context, callbacks)

Add callbacks to the main Gamepad handler to handle connect/disconnect/button down/button up/axis change/float value buttons.

Parameters
Name Type Description
context object

The context under which the callbacks are run.

callbacks object

Object that takes six different callback methods:
onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback

Source code: input/Gamepad.js (Line 139)
doc_phaser
2017-02-14 10:48:51
Comments
Leave a Comment

Please login to continue.