15 lines
357 B
C#
15 lines
357 B
C#
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
[RequireComponent(typeof(Image))]
|
|
public class ClickHandlerMediator : MonoBehaviour, IPointerClickHandler
|
|
{
|
|
public event UnityAction OnClick = delegate { };
|
|
|
|
public void OnPointerClick(PointerEventData event_data)
|
|
{
|
|
OnClick();
|
|
}
|
|
} |