Intersects() public abstract method

public abstract Intersects ( CollisionElement collisionElement ) : bool
collisionElement CollisionElement
return bool
        public override bool Intersects(CollisionElement collisionElement)
        {
            if (collisionElement is CollisionConvexPolygon)
                return Intersects(collisionElement as CollisionConvexPolygon);

            if (collisionElement is CollisionCircle)
                return Intersects(collisionElement as CollisionCircle);

            return collisionElement.Intersects(this);
        }
        public override bool Intersects(CollisionElement collisionElement)
        {
            if (collisionElement is CollisionConvexPolygon)
            {
                return(Intersects(collisionElement as CollisionConvexPolygon));
            }

            if (collisionElement is CollisionCircle)
            {
                return(Intersects(collisionElement as CollisionCircle));
            }

            return(collisionElement.Intersects(this));
        }
Example #3
0
        public override bool Intersects(CollisionElement collisionElement)
        {
            var polygon = collisionElement as CollisionConvexPolygon;

            if (polygon != null)
            {
                return(Intersects(polygon));
            }

            var circle = collisionElement as CollisionCircle;

            if (circle != null)
            {
                return(Intersects(circle));
            }

            return(collisionElement.Intersects(this));
        }
        public override bool Intersects(CollisionElement collisionElement)
        {
            var polygon = collisionElement as CollisionConvexPolygon;
            if (polygon != null)
                return Intersects(polygon);

            var circle = collisionElement as CollisionCircle;
            if (circle != null)
                return Intersects(circle);

            return collisionElement.Intersects(this);
        }