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,8 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Actions;
|
||||
using Tiles;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace Shop {
|
||||
public class ShopUI : MonoBehaviour {
|
||||
public class ShopUI : MonoBehaviour , IPointerEnterHandler, IPointerExitHandler{
|
||||
public Transform itemsParent;
|
||||
public Transform animalsParent;
|
||||
public GameObject shopUI;
|
||||
|
|
@ -81,5 +85,19 @@ namespace Shop {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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