fix - Ball - reflectOnPaddle - wrong estimation and therefore no bottom paddle behaviour
This commit is contained in:
parent
341aa10277
commit
ce770c9cc7
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user