[Unity]EasyTouch手指事件说明

这篇博客介绍了如何在Unity项目中使用EasyTouch插件处理手指事件。通过导入EasyTouchBundle并参考Examples中的SimpleExamples场景,开发者可以学习到如何实现手指示例。主要涉及的文件包括EasyTouch.cs。此外,提供了多个参考资料,包括不同版本的EasyTouch文档,以及关于手指滑动距离值的获取。
摘要由CSDN通过智能技术生成

如何使用EasyTouch事件,参考资料4

Unity项目导入EasyTouch插件

Assets\EasyTouchBundle\EasyTouch\Examples\4.X\SimpleExamples文件夹内有手指示例场景

Assets\EasyTouchBundle\EasyTouch\Plugins\Engine

EasyTouch.cs

...
	#region Events事件
	/// <summary>
	/// Occurs when The system cancelled tracking for the touch, as when (for example) the user puts the device to her face.
	/// 取消
	/// </summary>
	public static event TouchCancelHandler On_Cancel;
	/// <summary>
	/// Occurs when the touch count is no longer egal to 2 and different to 0, after the begining of a two fingers gesture.
	/// 2个手指取消
	/// </summary>
	public static event Cancel2FingersHandler On_Cancel2Fingers;

#region 1手指事件
	/// <summary>
	/// Occurs when a finger touched the screen.
	/// 单手指 开始触摸
	/// </summary>
	public static event TouchStartHandler On_TouchStart;
		/// <summary>
		/// Occurs as the touch is active.
		/// 单手指 结束触摸
		/// </summary>
		public static event TouchDownHandler On_TouchDown;
	/// <summary>
	/// Occurs when a finger was lifted from the screen.
	/// 单手指 触摸后抬起
	/// </summary>
	public static event TouchUpHandler On_TouchUp;
	/// <summary>
	/// Occurs when a finger was lifted from the screen, and the time elapsed since the beginning of the touch is less than the time required for the detection of a long tap.
	/// 单手指 轻敲点击
	/// </summary>
	public static event SimpleTapHandler On_SimpleTap;
		/// <summary>
		/// Occurs when the number of taps is egal to 2 in a short time.
		/// 单手指 连续轻敲双次点击
		/// </su
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值