Also allow rect to go out of screen at the bottom

Otherwise some gaps at the very bottom are extremely hard to get.
This commit is contained in:
David96 2021-01-05 12:33:25 +01:00
parent 70f279bd31
commit 6f6d37e4d7

View File

@ -79,7 +79,7 @@ class GameScreen implements LinearColorAnimator.AnimationListener
Rectangle birdRect = _bird.getRect(); Rectangle birdRect = _bird.getRect();
if (_world.checkCollision(_bird.getRect()) if (_world.checkCollision(_bird.getRect())
|| birdRect.getY() + birdRect.getHeight() > TurtleWelt.HEIGHT || birdRect.getY() > TurtleWelt.HEIGHT
|| birdRect.getY() + birdRect.getHeight() < 0) || birdRect.getY() + birdRect.getHeight() < 0)
{ {
System.out.print("\n"); System.out.print("\n");