2024-09-16 09:15:45 -07:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.EventSystems;
|
|
|
|
|
|
|
|
public class UIElementMouseCapturer : EventTrigger
|
|
|
|
{
|
|
|
|
public override void OnPointerEnter(PointerEventData eventData)
|
|
|
|
{
|
|
|
|
InputManager.Instance.mouseActive = false;
|
|
|
|
base.OnPointerEnter(eventData);
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void OnPointerExit(PointerEventData eventData)
|
|
|
|
{
|
|
|
|
InputManager.Instance.mouseActive = true;
|
|
|
|
base.OnPointerExit(eventData);
|
|
|
|
}
|
|
|
|
|
2024-09-24 17:05:33 -07:00
|
|
|
public void OnDisable()
|
|
|
|
{
|
|
|
|
OnPointerExit(null);
|
|
|
|
}
|
|
|
|
|
2024-09-16 09:15:45 -07:00
|
|
|
}
|