private bool BounceBallFromCorner(IBall ball) { if (Flags.OverlapCornerBottomLeft()) { ball.BounceCorner(Corner.BottomLeft); return(true); } if (Flags.OverlapCornerBottomRight()) { ball.BounceCorner(Corner.BottomRight); return(true); } if (Flags.OverlapCornerTopLeft()) { ball.BounceCorner(Corner.TopLeft); return(true); } if (Flags.OverlapCornerTopRight()) { ball.BounceCorner(Corner.TopRight); return(true); } return(false); }
private bool BounceBallFromCorner(IBall ball) { if (!XLeftInside && XRightInside && YTopInside && !YBottomInside) { ball.BounceCorner(Corner.BottomLeft); return(true); } if (XLeftInside && !XRightInside && YTopInside && !YBottomInside) { ball.BounceCorner(Corner.BottomRight); return(true); } if (!XLeftInside && XRightInside && !YTopInside && YBottomInside) { ball.BounceCorner(Corner.TopLeft); return(true); } if (XLeftInside && !XRightInside && !YTopInside && YBottomInside) { ball.BounceCorner(Corner.TopRight); return(true); } return(false); }