Phaser API Documentation

  Version: 
isButtonDown(index)

Description:

Returns if the button is pressed down or not. The index must be valid within the range of buttons supported by this Gamepad.

Parameters:

name type description
index number

The index of the button to get the value for.

Returns:
Description:

true if the button is considered as being pressed down, otherwise false.

Type:
  • boolean
Examples:
Since: 3.10.0