void OnEnable ()
{
EasyTouch.On_Swipe += EasyTouch_On_Swipe;
EasyTouch.On_Drag += EasyTouch_On_Drag;
}
private void EasyTouch_On_Swipe(Gesture gesture)
{
EasyTouch_On_Drag( gesture);
}
private void EasyTouch_On_Drag(Gesture gesture)
{
transform.Translate(-(Vector3.left * gesture.deltaPosition.x / Screen.width) * 2);
transform.Translate(-(Vector3.back * gesture.deltaPosition.y / Screen.height) * 4);
}
我现在在屏幕任意一个位置都可以移动物体 我只想在物体上点击的时候才移动怎么办?????