NO LONGER CLICK THROUGH UI OMG
This commit is contained in:
parent
d3a06effc5
commit
4a8067d3d7
7 changed files with 76 additions and 28 deletions
|
|
@ -1,9 +1,10 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Actions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class InventoryUI : MonoBehaviour {
|
||||
public class InventoryUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler {
|
||||
public Transform itemsParent;
|
||||
public GameObject inventoryUI;
|
||||
private Inventory _inventory;
|
||||
|
|
@ -59,4 +60,18 @@ public class InventoryUI : MonoBehaviour {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn off ActionManager when Pointer over UI
|
||||
*/
|
||||
public void OnPointerEnter(PointerEventData eventData) {
|
||||
ActionManager.Instance.Enabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn on ActionManager when Pointer over UI
|
||||
*/
|
||||
public void OnPointerExit(PointerEventData eventData) {
|
||||
ActionManager.Instance.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue