27 lines
793 B
C#
Raw Normal View History

2025-01-02 12:15:45 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
/*******************************************************************************
*Create By CG
*Function <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UGUIͼƬ<EFBFBD>ϲ<EFBFBD><EFBFBD><EFBFBD>
*******************************************************************************/
namespace CG.UTility
{
public class HoverImageCtrl : MonoBehaviour, IPointerEnterHandler,IPointerExitHandler
{
public Action _EnterEvent { get; set; }
public Action _ExitEvent { get; set; }
public void OnPointerEnter(PointerEventData eventData)
{
_EnterEvent?.Invoke();
}
public void OnPointerExit(PointerEventData eventData)
{
_ExitEvent?.Invoke();
}
}
}