if (Input.GetKeyUp(KeyCode.Joystick1Button0)) { Debug.Log("Joystick1Button0"); } if (Input.GetKeyUp(KeyCode.Joystick1Button1) || Input.GetKeyUp(KeyCode.Escape)) { PlatformUtil.ExitUnityActivity.Exit(); } if (Input.GetKeyUp(KeyCode.Joystick1Butto
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using System; public class JoyStickController : MonoBehaviour,IDragHandler,IEndDragHandler,IBeginDragHandler{ public float maxDragDistance
事件接口 IDragHandler(常用):鼠标按下拖动时执行(只要鼠标在拖动就一直执行) IDropHandler:对象拖动结束时,如果鼠标在物体的范围内,执行一次(依赖于IDragHandler存在) (结束时鼠标必须在图片范围内) IBeginDragHandler:开始拖动时执行一次 IEndDragHandler:拖动结束时执行一次(结束时对鼠标在哪没有要求) IScrollHandler:监控鼠标滚轮 using System; using System.Collections; u
先看官方介绍:https://www.assetstore.unity3d.com/#/content/3322 (Allows you to quickly and easily develop actions based on a touchscreen, joystick & button. All major gestures are recognized by EasyTouch such as tap, double tap, swipe, twist, pinch...) 简单快速