Initial commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class HoveredUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
private GhostManagerV2 ghostManager;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
ghostManager = GhostManagerV2.getInstance();
|
||||
}
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
ghostManager.clearGhost();
|
||||
ghostManager.setDrag(false);
|
||||
if (!InputModeManager.Is(InputMode.UI))
|
||||
InputModeManager.Push(InputMode.UI);
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
ghostManager.setupBlock();
|
||||
ghostManager.setDrag(true);
|
||||
InputModeManager.Pop(InputMode.UI);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user