Reset ball on top of battle when hitting bottom edge of screen
Render paddle from bottom-left Change screen-edge reflection checks Remove use of 'this' where not needed Make BrickBuster entities private
This commit is contained in:
@ -16,15 +16,13 @@ public class BrickBuster extends ApplicationAdapter {
|
||||
public static final int HEIGHT = 600;
|
||||
public static final String TITLE = "Brick Buster";
|
||||
|
||||
public static final Vector2 RIGHT_EDGE = new Vector2(0, 1);
|
||||
public static final Vector2 TOP_EDGE = new Vector2(-1, 0);
|
||||
public static final Vector2 LEFT_EDGE = new Vector2(0, -1);
|
||||
public static final Vector2 BOTTOM_EDGE = new Vector2(1, 0);
|
||||
public static final Vector2 HORIZONTAL_EDGE = new Vector2(1, 0);
|
||||
public static final Vector2 VERTICAL_EDGE = new Vector2(0, 1);
|
||||
|
||||
Ball ball;
|
||||
Paddle paddle;
|
||||
ArrayList<Block> blocks;
|
||||
boolean playing = false;
|
||||
private Ball ball;
|
||||
private Paddle paddle;
|
||||
private ArrayList<Block> blocks;
|
||||
private boolean playing = false;
|
||||
|
||||
@Override
|
||||
public void create () {
|
||||
@ -66,13 +64,16 @@ public class BrickBuster extends ApplicationAdapter {
|
||||
|
||||
@Override
|
||||
public void dispose () {
|
||||
|
||||
}
|
||||
|
||||
public boolean isPlaying() {
|
||||
return playing;
|
||||
}
|
||||
|
||||
public void setPlaying(boolean playing) {
|
||||
this.playing = playing;
|
||||
}
|
||||
|
||||
public Ball getBall() {
|
||||
return ball;
|
||||
}
|
||||
|
Reference in New Issue
Block a user