Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
InputEventScreenTouch¶
继承: InputEventFromWindow < InputEvent < Resource < RefCounted < Object
代表屏幕触摸事件。
描述¶
存储多点触摸的按压/释放信息。支持触摸按压、触摸释放以及用于多点触摸计数和定序的 index。
教程¶
属性¶
|
||
|
||
|
||
|
||
|
属性说明¶
bool canceled = false
如果为 true
,则触摸事件被取消。
bool double_tap = false
如果为 true
,则触摸状态为双击。
int index = 0
在多点触摸事件中的触摸指数。一个索引 = 一个手指。
Vector2 position = Vector2(0, 0)
触摸位置,使用屏幕(全局)坐标。
bool pressed = false
如果为 true
,触摸的状态为按下。如果为 false
,触摸的状态被释放。