Removed hard-coded values, shrunk ball
This commit is contained in:
parent
ace35e1a2c
commit
4c3add8378
@ -74,4 +74,8 @@ public class BrickBuster extends ApplicationAdapter {
|
|||||||
public Paddle getPaddle() {
|
public Paddle getPaddle() {
|
||||||
return paddle;
|
return paddle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArrayList<Block> getBlocks() {
|
||||||
|
return blocks;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,14 +7,14 @@ import com.me.brickbuster.BrickBuster;
|
|||||||
|
|
||||||
public class Ball extends Entity {
|
public class Ball extends Entity {
|
||||||
|
|
||||||
public static final int RADIUS = 25;
|
public static final int RADIUS = 20;
|
||||||
public static final Color BALL_COLOR = Color.CHARTREUSE;
|
public static final Color BALL_COLOR = Color.CHARTREUSE;
|
||||||
|
|
||||||
public Vector2 direction;
|
public Vector2 direction;
|
||||||
public float speed;
|
public float speed;
|
||||||
|
|
||||||
public Ball(BrickBuster brickBuster) {
|
public Ball(BrickBuster brickBuster) {
|
||||||
super(brickBuster, 400, 83);
|
super(brickBuster, BrickBuster.WIDTH/2, Paddle.PADDLE_Y + RADIUS + Paddle.PADDLE_HEIGHT/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,10 +10,11 @@ public class Paddle extends Entity {
|
|||||||
|
|
||||||
public static final Color PADDLE_COLOR = Color.BLACK;
|
public static final Color PADDLE_COLOR = Color.BLACK;
|
||||||
public static final int PADDLE_WIDTH = 100;
|
public static final int PADDLE_WIDTH = 100;
|
||||||
public static final int PADDLE_HEIGHT = 15;
|
public static final int PADDLE_HEIGHT = 16;
|
||||||
|
public static final int PADDLE_Y = 50;
|
||||||
|
|
||||||
public Paddle(BrickBuster brickBuster) {
|
public Paddle(BrickBuster brickBuster) {
|
||||||
super(brickBuster, BrickBuster.WIDTH/2, 50);
|
super(brickBuster, BrickBuster.WIDTH/2, PADDLE_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user