Esempio n. 1
0
 private bool IsObjectInside(T obj)
 {
     if (_objectBounds.GetTop(obj) > Area.Bottom)
     {
         return(false);
     }
     if (_objectBounds.GetBottom(obj) < Area.Top)
     {
         return(false);
     }
     if (_objectBounds.GetLeft(obj) > Area.Right)
     {
         return(false);
     }
     if (_objectBounds.GetRight(obj) < Area.Left)
     {
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
        private bool IsObjectInMainRect(T obj)
        {
            if (_objectBounds.GetTop(obj) > MainRect.Top)
            {
                return(false);
            }
            if (_objectBounds.GetBottom(obj) < MainRect.Bottom)
            {
                return(false);
            }
            if (_objectBounds.GetLeft(obj) > MainRect.Right)
            {
                return(false);
            }
            if (_objectBounds.GetRight(obj) < MainRect.Left)
            {
                return(false);
            }

            return(true);
        }