No longer allow balls to collect powerups

This commit is contained in:
Matt Low 2018-11-19 23:41:48 +04:00
parent 9df81ee854
commit 719c32502c
2 changed files with 2 additions and 3 deletions

View File

@ -96,8 +96,7 @@ public class Ball extends Entity implements PhysicsBody, CollisionListener {
ballFixture.filter.categoryBits = EntityType.BALL;
ballFixture.filter.maskBits = EntityType.BOUNDARY | EntityType.BRICK
| EntityType.PADDLE | EntityType.POWER_UP
| EntityType.SHIELD;
| EntityType.PADDLE | EntityType.SHIELD;
body = state.world.createBody(ballBody);
body.createFixture(ballFixture);

View File

@ -75,7 +75,7 @@ public abstract class PowerUp extends Entity implements PhysicsBody, CollisionLi
ballFixture.isSensor = true;
ballFixture.filter.categoryBits = EntityType.POWER_UP;
ballFixture.filter.maskBits = EntityType.PADDLE | EntityType.BALL;
ballFixture.filter.maskBits = EntityType.PADDLE;
body = state.world.createBody(ballBody);
body.createFixture(ballFixture);