alarm class 정리
This commit is contained in:
40
Assets/Scripts/UVC/UI/Common/InteractiveUI.cs
Normal file
40
Assets/Scripts/UVC/UI/Common/InteractiveUI.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace UVC.UI.Common
|
||||
{
|
||||
public class InteractiveUI : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
public Action<PointerEventData> OnPointerClickHandler;
|
||||
public Action<PointerEventData> OnPointerEnterHandler;
|
||||
public Action<PointerEventData> OnPointerExitHandler;
|
||||
|
||||
/// <summary>
|
||||
/// 포인터로 이 객체를 클릭했을 때 호출됩니다.
|
||||
/// </summary>
|
||||
/// <param name="eventData">클릭 이벤트와 관련된 데이터입니다.</param>
|
||||
public virtual void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
OnPointerClickHandler?.Invoke(eventData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 포인터가 이 객체 위로 들어왔을 때 호출됩니다. 하이라이트 효과 등에 사용할 수 있습니다.
|
||||
/// </summary>
|
||||
/// <param name="eventData">포인터 이벤트와 관련된 데이터입니다.</param>
|
||||
public virtual void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
OnPointerEnterHandler?.Invoke(eventData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 포인터가 이 객체에서 벗어났을 때 호출됩니다.
|
||||
/// </summary>
|
||||
/// <param name="eventData">포인터 이벤트와 관련된 데이터입니다.</param>
|
||||
public virtual void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
OnPointerExitHandler?.Invoke(eventData);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UVC/UI/Common/InteractiveUI.cs.meta
Normal file
2
Assets/Scripts/UVC/UI/Common/InteractiveUI.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e44a8f8f8a81f99428ec4ae80dfff0ce
|
||||
Reference in New Issue
Block a user