예제 #1
0
        public static bool Intersects(ShapePrimitive a, ShapePrimitive b)
        {
            var aCircle = a as CircleShape;
            if (aCircle != null) { return Intersects(aCircle, b); }

            return CantCollide(a, b);
        }
예제 #2
0
        public static bool Intersects(CircleShape a, ShapePrimitive b)
        {
            var bCircle = b as CircleShape;
            if (bCircle != null) { return Intersects(a, bCircle); }

            return CantCollide(a, b);
        }
예제 #3
0
 private static bool CantCollide(ShapePrimitive a, ShapePrimitive b)
 {
     throw new NotImplementedException(string.Format(
         "Collision testing between {0} and {1} not implemented",
         a.GetType(), b.GetType()
     ));
 }