justPressed(duration) → {boolean}
The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate.
Note that calling justPressed doesn't reset the pressed status of the Pointer, it will return true
for as long as the duration is valid.
If you wish to check if the Pointer was pressed down just once then see the Sprite.events.onInputDown event.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
duration | number | <optional> | The time to check against. If none given it will use InputManager.justPressedRate. |
Returns
boolean -
true if the Pointer was pressed down within the duration given.
- Source code: input/Pointer.js (Line 1041)
Please login to continue.