using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; /******************************************************************************* *Create By CG *Function Êó±êÐü¸¡ÔÚUGUIͼƬÉϲÙ×÷ *******************************************************************************/ 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(); } } }