Keyboard#addKey()

addKey(keycode) → {Phaser.Key}

If you need more fine-grained control over a Key you can create a new Phaser.Key object via this method.
The Key object can then be polled, have events attached to it, etc.

Parameters
Name Type Description
keycode integer

The keycode of the key.

Returns

The Key object which you can store locally and reference directly.

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

Please login to continue.