예제 #1
0
        public bool IsInside(CircleData circle)
        {
            var circlePosition = circle.GetPosition();
            var circleRadius   = circle.GetRadius();

            if (x > circlePosition.x + circleRadius)
            {
                return(false);
            }
            if (x + width < circlePosition.x - circleRadius)
            {
                return(false);
            }
            if (y > circlePosition.y + circleRadius)
            {
                return(false);
            }
            if (y + height < circlePosition.y - circleRadius)
            {
                return(false);
            }
            return(true);
        }
예제 #2
0
 public bool IsSameColor(CircleData circle)
 {
     return(circle.red == red);
 }