2024年4月12日发(作者:)
学IT技能上我学院网
Unity3D Touch触摸属性的使用方法
Touch 触摸
struct in UnityEngine
Description 描述
Structure describing the status of a finger touching the screen.
描述手指触摸屏幕的状态的结构。
Devices can track a number of different pieces of data about a touch on a touchscreen,
including its phase (ie, whether it has just started, ended or moved), its position and
whether the touch was a single contact or several taps. Furthermore, the continuity of a
touch between frame updates can be detected by the device, so a consistent ID number
can be reported across frames and used to determine how a particular finger is moving.
设备可以跟踪触摸屏上的多个触摸,包括它的相位(例如,是否开始、结束或移动)、它的
位置和是否有单个或多个触摸点。此外,触摸之间的帧更新连续性能由设备检测,因此,一
致的ID能跨帧报告,并用了确定指定手指移动了多少。
The Touch struct is used by Unity to store data relating to a single touch instance and is
returned by the ch function. Fresh calls to GetTouch will be required on each
frame update to obtain the latest touch information from the device but the fingerId
property can be used to identify the same touch between frames.
触摸结构用于通过Unity存储与单个触摸实例相关数据并由ch函数返回。新
调用GetTouch需要在每帧更新从设备获得最新的触摸信息,但fingerId属性能用于识别帧
之间的相同的触摸。
See Also: ch, TouchPhase enum.
Variables 变量
deltaPosition
The position delta since last change.
自最后改变的位置增量。
deltaTime
Amount of time that has passed since the last recorded
change in Touch values.
触摸值自上次改变已经过去的时间量。
Unity3D|Cocos|php|HTML5|Java|ios|Android|C#|AS3|UI设计|原画设计|动漫美术|游戏策划
学IT技能上我学院网
fingerId
phase
position
tapCount
The unique index for the touch.
用于触摸的唯一索引。
Describes the phase of the touch.
该触摸相位的描述。
The position of the touch in pixel coordinates.
像素坐标系,触摸的位置。
Number of taps.
触摸轻触的次数。
Unity3D|Cocos|php|HTML5|Java|ios|Android|C#|AS3|UI设计|原画设计|动漫美术|游戏策划


发布评论