InputEventScreenTouch
Represents a screen touch event.
Represents a screen touch event.
Stores information about multi-touch press/release input events. Supports touch press, touch release and InputEventScreenTouch.Index for multi-touch count and order.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
InputEventScreenTouchConstructor
public InputEventScreenTouch();Properties6
CanceledProperty
public bool Canceled { get; set; }If true, the touch event has been canceled.
DoubleTapProperty
public bool DoubleTap { get; set; }If true, the touch's state is a double tap.
IndexProperty
public int Index { get; set; }The touch index in the case of a multi-touch event. One index = one finger.
LongPressProperty
public bool LongPress { get; set; }If true, the touch's state is a long press.
Note: This is only supported on Android and iOS.
PositionProperty
public Vector2 Position { get; set; }The touch position in the viewport the node is in, using the coordinate system of this viewport.
PressedProperty
public bool Pressed { get; set; }If true, the touch's state is pressed. If false, the touch's state is released.
Methods10
GetIndexint
public int GetIndex();intGetPositionVector2
public Vector2 GetPosition();Vector2IsDoubleTapbool
public bool IsDoubleTap();boolIsLongPressbool
public bool IsLongPress();boolSetCanceledvoid
public void SetCanceled(bool canceled);| Name | Type | Default |
|---|---|---|
canceled | bool | — |
SetDoubleTapvoid
public void SetDoubleTap(bool doubleTap);| Name | Type | Default |
|---|---|---|
doubleTap | bool | — |
SetIndexvoid
public void SetIndex(int index);| Name | Type | Default |
|---|---|---|
index | int | — |
SetLongPressvoid
public void SetLongPress(bool longPress);| Name | Type | Default |
|---|---|---|
longPress | bool | — |
SetPositionvoid
public void SetPosition(Vector2 position);| Name | Type | Default |
|---|---|---|
position | Vector2 | — |
SetPressedvoid
public void SetPressed(bool pressed);| Name | Type | Default |
|---|---|---|
pressed | bool | — |