Files
berry-dash-with-guns-custom/Assets/Scripts/HoldableButton.cs
T
2025-10-04 11:20:33 -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;
}
}