Added multi ball powerup

This commit is contained in:
2018-11-12 19:15:24 +04:00
parent 4a7c9215dd
commit 4694947a08
3 changed files with 42 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import com.badlogic.gdx.math.Vector2;
import com.me.brickbuster.entity.*;
import com.me.brickbuster.entity.powerup.GluePowerUp;
import com.me.brickbuster.entity.powerup.LongerPaddlePowerUp;
import com.me.brickbuster.entity.powerup.MultiBallPowerUp;
import com.me.brickbuster.entity.powerup.PowerUp;
import java.util.ArrayList;
@ -53,6 +54,9 @@ public class BrickBuster extends ApplicationAdapter {
else if (MathUtils.randomBoolean(0.08f)) {
powerUpType = LongerPaddlePowerUp.class;
}
else if (MathUtils.randomBoolean(0.04f)) {
powerUpType = MultiBallPowerUp.class;
}
bricks.add(new Brick(this, powerUpType, x, HEIGHT - y));
}
}