getMouseButton()
world.input.getMouseButton(button)
Description
Returns true while the user holds down the mouse button identified by button number.
Parameters
Property | Type | Description |
---|---|---|
button | number | Button number. |
Mouse Button Keys
Number | Mouse Button |
---|---|
0 | Primary |
1 | Auxillary |
2 | Secondary |
3 | Fourth |
4 | Fifth |
Returns
Boolean.
Example
world.input.getMouseButton(0)