36 lines
841 B
C#
36 lines
841 B
C#
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class TileHandler : MonoBehaviour, IDropHandler, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
|
|
{
|
|
private void Awake()
|
|
{
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
public void OnDrop(PointerEventData eventData)
|
|
{
|
|
Debug.Log("Dropped on Tile");
|
|
// what was dropped
|
|
// var droppedItem = eventData.pointerDrag.GetComponent<>().item;
|
|
// Debug.Log("Dropped Item: " + droppedItem.name);
|
|
}
|
|
|
|
public void OnPointerClick(PointerEventData eventData)
|
|
{
|
|
Debug.Log("Tile Clicked!");
|
|
}
|
|
|
|
public void OnPointerEnter(PointerEventData eventData)
|
|
{
|
|
Debug.Log("Tile Hovered!");
|
|
}
|
|
|
|
public void OnPointerExit(PointerEventData eventData)
|
|
{
|
|
Debug.Log("Tile Unhovered!");
|
|
}
|
|
} |