using UnityEngine;

public abstract class Hazard : MonoBehaviour
{
    public bool isDragging { get; protected set; }
    public bool onMouseDown { get; protected set; }

    private void OnMouseDown()
    {
        onMouseDown = true;
        if (PlayerInteraction.Instance != null)
        {
            PlayerInteraction.Instance.StartInteraction();
        }
    }

    private void OnMouseUp()
    {
        if (onMouseDown)
        {
            onMouseDown = false;
            if (PlayerInteraction.Instance != null)
            {
                PlayerInteraction.Instance.StopInteraction();
            }
        }
    }

    public virtual void OnDragEnd() { }
}