如何使用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.
/// 单手指 连续轻敲双次点击
/// </s

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

被折叠的 条评论
为什么被折叠?



