Allow ball to fall "out" of screen

This commit is contained in:
BlueNutterfly 2018-11-12 18:13:48 +04:00
parent 83e270062b
commit 1ee5a5a36c

View File

@ -77,7 +77,7 @@ public class Ball extends Entity {
Utils.reflect(direction, BrickBuster.VERTICAL_EDGE); Utils.reflect(direction, BrickBuster.VERTICAL_EDGE);
} else if (new_pos.y + RADIUS > BrickBuster.HEIGHT) { } else if (new_pos.y + RADIUS > BrickBuster.HEIGHT) {
Utils.reflect(direction, BrickBuster.HORIZONTAL_EDGE); Utils.reflect(direction, BrickBuster.HORIZONTAL_EDGE);
} else if (new_pos.y - RADIUS < 0) { } else if (new_pos.y + RADIUS < 0) {
isDead = true; isDead = true;
return; return;
} }