예제 #1
0
        private void SaveEventData(PointerEventData evt)
        {
            PointerHist hist = new PointerHist();

            hist.data = evt;
            //hist.notEmpty = evt.pointerEnter != null;
            hist.notEmpty = evt.pointerCurrentRaycast.gameObject != null;

            _lastPoints.Add(hist);
        }
예제 #2
0
 public bool IsHoveredUI(int id)
 {
     for (int i = 0; i < _lastPoints.Count; i++)
     {
         PointerHist hist = _lastPoints[i];
         if (hist.data.pointerId == id)
         {
             return(hist.notEmpty); //|| hist.data.pointerEnter != null;
         }
     }
     return(false);
 }
예제 #3
0
 public GameObject GetHoveredUI(int id)
 {
     for (int i = 0; i < _lastPoints.Count; i++)
     {
         PointerHist hist = _lastPoints[i];
         if (hist.data.pointerId == id)
         {
             return(hist.data.pointerEnter);
         }
     }
     return(null);
 }