Keyboard#addCallbacks()

addCallbacks(context, onDown, onUp, onPress)

Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated.

Parameters
Name Type Argument Default Description
context object

The context under which the callbacks are run.

onDown function <optional>
null

This callback is invoked every time a key is pressed down.

onUp function <optional>
null

This callback is invoked every time a key is released.

onPress function <optional>
null

This callback is invoked every time the onkeypress event is raised.

Source code: input/Keyboard.js (Line 114)
doc_phaser
2017-02-14 10:53:45
Comments
Leave a Comment

Please login to continue.