Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
InputEventScreenTouch¶
Inherits: InputEventFromWindow < InputEvent < Resource < RefCounted < Object
代表屏幕触摸事件。
Description¶
存储多点触摸的按压/释放信息。支持触摸按压、触摸释放以及用于多点触摸计数和定序的 index。
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
|
Property Descriptions¶
bool canceled = false
如果为 true
,则触摸事件被取消。
bool double_tap = false
如果为 true
,则触摸状态为双击。
int index = 0
在多点触摸事件中的触摸指数。一个索引 = 一个手指。
Vector2 position = Vector2(0, 0)
触摸位置,使用屏幕(全局)坐标。
bool pressed = false
如果为 true
,触摸的状态为按下。如果为 false
,触摸的状态被释放。