1
0
Fork 0

fix - Ball - reflectOnPaddle - wrong estimation and therefore no bottom paddle behaviour

This commit is contained in:
rxbn_ 2019-12-15 07:27:18 +01:00
parent 341aa10277
commit ce770c9cc7
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ public class Ball implements IBall {
// only two paddles defined in the game design, therefore greater or smaller than middle of screen
//deciding if the paddle is at the top or bottom to adjust if its +or- y direction
if (paddle.getPosition().getY() <= Constants.SCREEN_HEIGHT) {
if (paddle.getPosition().getY() <= Constants.SCREEN_HEIGHT/2) {
// top paddle
reflectionPoint.setY(reflectionPoint.getY() - Constants.REFLECTION_OFFSET);
} else {