27 lines
793 B
C#
27 lines
793 B
C#
|
|
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();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|