Refactor powerups, move to new package. Decrease long paddle chance to 8%

This commit is contained in:
2018-11-12 11:33:22 +04:00
parent 88428fded9
commit d3eb876960
5 changed files with 13 additions and 4 deletions

View File

@ -6,6 +6,9 @@ import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.math.MathUtils;
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.PowerUp;
import java.util.ArrayList;
import java.util.Iterator;
@ -39,7 +42,7 @@ public class BrickBuster extends ApplicationAdapter {
if (MathUtils.randomBoolean(0.08f)) {
powerUpType = GluePowerUp.class;
}
else if (MathUtils.randomBoolean(0.25f)) {
else if (MathUtils.randomBoolean(0.08f)) {
powerUpType = LongerPaddlePowerUp.class;
}
bricks.add(new Brick(this, powerUpType, x, HEIGHT - y));