Ejemplo n.º 1
0
        public int IsHit(Point point)
        {
            var hit    = CalculateDistance.Calculate(Center, point) <= _diameter;
            int points = 0;

            if (hit)
            {
                Color  = Color.Red;
                points = (_colorIndex + 1) * 5;
            }

            return(points);
        }
Ejemplo n.º 2
0
        public bool Colide(Ball ball)
        {
            var distance = CalculateDistance.Calculate(Center, ball.Center);

            return(distance <= (Radius + ball.Radius));
        }