Ejemplo n.º 1
0
        protected bool doITouchTheBall(Ball b)
        {
            bool landImpliesFly = !isLandingNeeded || (Math.Round(b.Rotation).Equals(Math.Round(perspective)));
            bool touch          = CollisionUtilities.CircleIntersectsRectangle(360, b.Center, b.Radium, bounds());

            return(isEnabled && touch && landImpliesFly);
        }
Ejemplo n.º 2
0
 protected bool doITouchBall(Ball b)
 {
     return(CollisionUtilities.CircleIntersectsRectangle(30, b.Center, b.Radium, getBounds()));
 }
Ejemplo n.º 3
0
        protected bool doITouchTheBall(Ball b)
        {
            RectangleF block = new RectangleF(currentX - 1f, currentY - 1f, Constants.BlockWidth + 2f, Constants.BlockWidth + 2f);

            return(CollisionUtilities.CircleIntersectsRectangle(30, b.Center, b.Radium, block));
        }