Touch
Complete API reference for Touch, including constructors, attributes, virtual attributes, and methods.
Package: JAVARuntime
Category: Input
Component: no
public class Touch
Constructors
| Signature | Description |
|---|---|
Touch(Touch) | Executes Touch and returns after the underlying engine call finishes. |
Touch() | Executes Touch and returns after the underlying engine call finishes. |
Attributes
| Name | Type | Description |
|---|---|---|
touch | Touch | Represents the touch value stored on this instance. Read or assign to update the property. |
Virtual Attributes
| Name | Type | Access | Description |
|---|---|---|---|
down | boolean | get/set | Checks whether the touch was just pressed. This returns true only on the first frame it was pressed. |
fromMouse | boolean | get | Returns whether this touch came from a mouse click. |
isFromMouse | boolean | set | Sets whether this touch came from a mouse click. |
longDown | boolean | get/set | Checks whether the touch was just long-pressed. This returns true only on the first frame it was long-pressed. |
longPressed | boolean | get/set | Checks whether the touch is being long-pressed. This returns true on every frame while it remains pressed for a long duration. |
position | Vector2 | get/set | Returns the position of the touch. |
pressed | boolean | get/set | Checks whether the touch is currently being held down. This returns true on every frame while it remains pressed. |
slide | Vector2 | get/set | Returns the slide vector of the touch. |
slided | boolean | get/set | Checks if the touch is slided. |
up | boolean | get/set | Checks whether the touch was just released. This returns true only on the first frame after it was released. |
Methods
| Signature | Returns | Description |
|---|---|---|
isPerformClick() | boolean | Executes isPerformClick and returns after the underlying engine call finishes. |
setPerformClick() | void | Executes setPerformClick and returns after the underlying engine call finishes. |