using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;


public class OnMouseHandler : MonoBehaviour , IPointerDownHandler , IPointerUpHandler, IDragHandler
{
	protected bool isDown = false;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

	public void OnPointerDown(PointerEventData eventData)
	{
		isDown = true;
	}
	public void OnPointerUp(PointerEventData eventData)
	{
		isDown = false;
	}
	public void OnDrag(PointerEventData eventData)
	{
		if (!isDown) return;

		var x = eventData.position.x;
		var y = eventData.position.y;
	}
}
