Delete bricks that go below the bottom of the play field

This commit is contained in:
Matt Low 2018-11-20 12:15:55 +04:00
parent 5611bbc611
commit 1aeab73cd0

View File

@ -78,6 +78,10 @@ public class Brick extends Entity implements PhysicsBody, CollisionListener {
hit(); hit();
hitByBall = false; hitByBall = false;
} }
if (getY() - BRICK_HEIGHT < 0) {
delete();
}
} }
@Override @Override