HeavenStudioPlus/Assets/Scripts/LevelEditor/ButtonDoubleClick.cs

21 lines
460 B
C#
Raw Normal View History

using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
namespace HeavenStudio.Editor
{
public class ButtonDoubleClick : MonoBehaviour, IPointerClickHandler
{
public UnityEvent onDoubleClick;
public void OnPointerClick(PointerEventData eventData)
{
var tap = eventData.clickCount;
if (tap == 2)
{
onDoubleClick.Invoke();
}
}
}
}