Files
berry-dash-custom/Assets/Scripts/HoldableButton.cs
T
2025-08-27 19:25:56 -07:00

18 lines
360 B
C#

using UnityEngine;
using UnityEngine.EventSystems;
public class HoldableButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
public bool isPressed;
public void OnPointerDown(PointerEventData eventData)
{
isPressed = true;
}
public void OnPointerUp(PointerEventData eventData)
{
isPressed = false;
}
}