Skip to main content

Touch

Complete API reference for Touch, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Input

Component: no


public class Touch

Constructors

SignatureDescription
Touch(Touch)Executes Touch and returns after the underlying engine call finishes.
Touch()Executes Touch and returns after the underlying engine call finishes.

Attributes

NameTypeDescription
touchTouchRepresents the touch value stored on this instance. Read or assign to update the property.

Virtual Attributes

NameTypeAccessDescription
downbooleanget/setChecks whether the touch was just pressed. This returns true only on the first frame it was pressed.
fromMousebooleangetReturns whether this touch came from a mouse click.
isFromMousebooleansetSets whether this touch came from a mouse click.
longDownbooleanget/setChecks whether the touch was just long-pressed. This returns true only on the first frame it was long-pressed.
longPressedbooleanget/setChecks whether the touch is being long-pressed. This returns true on every frame while it remains pressed for a long duration.
positionVector2get/setReturns the position of the touch.
pressedbooleanget/setChecks whether the touch is currently being held down. This returns true on every frame while it remains pressed.
slideVector2get/setReturns the slide vector of the touch.
slidedbooleanget/setChecks if the touch is slided.
upbooleanget/setChecks whether the touch was just released. This returns true only on the first frame after it was released.

Methods

SignatureReturnsDescription
isPerformClick()booleanExecutes isPerformClick and returns after the underlying engine call finishes.
setPerformClick()voidExecutes setPerformClick and returns after the underlying engine call finishes.