2025-01-02 12:15:45 +08:00

27 lines
793 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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();
}
}
}