2023-04-03 11:04:31 +08:00

28 lines
635 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using System;
namespace BF
{
public class UIDragEvent : UITouchEvent, IDragHandler
{
public void OnDrag(PointerEventData eventData)
{
if (!enable)
{
return;
}
if (currentPointerId != eventData.pointerId)
{
return;
}
if (luaFunc != null)
{
luaFunc((int)UITouchEventType.Drag, eventData.position.x, eventData.position.y);
}
}
}
}