Keyboard#isDown()

isDown(keycode) → {boolean}

Returns true of the key is currently pressed down. Note that it can only detect key presses on the web browser.

Parameters
Name Type Description
keycode integer

The keycode of the key to check: i.e. Phaser.KeyCode.UP or Phaser.KeyCode.SPACEBAR.

Returns
boolean -

True if the key is currently down, false if not or null if the Key wasn't found.

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

Please login to continue.