22 lines
584 B
C#
22 lines
584 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class DeselectedAction : MonoBehaviour, IDeselectHandler
|
|
{
|
|
public delegate void OnPointerClick(PointerEventData eventData);
|
|
private OnPointerClick _onPointerClick;
|
|
|
|
public DeselectedAction(OnPointerClick ooga)
|
|
{
|
|
_onPointerClick = ooga;
|
|
}
|
|
|
|
public void OnDeselect(BaseEventData eventData)
|
|
{
|
|
Debug.Log("Called to deselect");
|
|
//_onPointerClick.Invoke((PointerEventData)eventData);
|
|
Destroy(gameObject);
|
|
}
|
|
} |