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