- Degelijke pre state integratie.
- Help state naar volledigheid geintegreerd.
This commit is contained in:
@@ -17,15 +17,15 @@ import control.joystick.JoystickEvent;
|
||||
public class PreGameState extends GameState {
|
||||
|
||||
private double index2 = 3,
|
||||
index = 3,
|
||||
timer;
|
||||
index = 3;
|
||||
|
||||
private int grootte = 150;
|
||||
|
||||
SQLConnector sql;
|
||||
private SQLConnector sql;
|
||||
|
||||
BasicStroke s = new BasicStroke(20);
|
||||
private BasicStroke s = new BasicStroke(20);
|
||||
|
||||
BufferedImage screenshot;
|
||||
private BufferedImage screenshot;
|
||||
|
||||
public PreGameState(GameStateManager gsm, SongHandler sh, SQLConnector sql) {
|
||||
super(gsm, sh, sql);
|
||||
@@ -40,11 +40,13 @@ public class PreGameState extends GameState {
|
||||
|
||||
@Override
|
||||
public void update(float factor) {
|
||||
// timer = timer +factor/1000;
|
||||
// index -= timer;
|
||||
|
||||
index2 -= factor/1000;
|
||||
index = (double) Math.round(index2*1000)/1000;
|
||||
if(index <= 0){
|
||||
grootte = 150;
|
||||
index = 3;
|
||||
index2 = 3;
|
||||
gsm.setState(control.GameStateManager.State.PLAY_STATE);
|
||||
}
|
||||
|
||||
@@ -65,18 +67,12 @@ public class PreGameState extends GameState {
|
||||
g2.drawString(text, 325, 400);
|
||||
if(index < 1){
|
||||
text = "GO!!!";
|
||||
// width = g2.getFontMetrics().stringWidth("GO!!!");
|
||||
// g2.drawString("GO!!!",325,600);
|
||||
}
|
||||
else if (index < 2){
|
||||
text = "SET";
|
||||
// width = g2.getFontMetrics().stringWidth("SET");
|
||||
// g2.drawString("SET", 450,600);
|
||||
}
|
||||
else{
|
||||
text = "READY";
|
||||
// width = g2.getFontMetrics().stringWidth("READY");
|
||||
// g2.drawString("READY", 325, 600);
|
||||
}
|
||||
width = g2.getFontMetrics().stringWidth(text);
|
||||
g2.drawString(text, (256+1024/2)-width/2, 600);
|
||||
|
||||
Reference in New Issue
Block a user