You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
890 B
Java
35 lines
890 B
Java
2 years ago
|
package Main;
|
||
|
|
||
|
import org.newdawn.slick.GameContainer;
|
||
|
import org.newdawn.slick.Graphics;
|
||
|
|
||
|
public class State {
|
||
|
int stateId;
|
||
|
String currentState;
|
||
|
public void init(GameContainer gc) {
|
||
|
// TODO Auto-generated method stub
|
||
|
stateId = 0;
|
||
|
currentState ="titel";
|
||
|
}
|
||
|
|
||
|
public void update(GameContainer gc, float _delta) {
|
||
|
// TODO Auto-generated method stub
|
||
|
switch(stateId){//definierung der States
|
||
|
case 0 : currentState = "titel";break;
|
||
|
case 1 : currentState = "start";break;
|
||
|
case 2 : currentState = "paused";break;
|
||
|
case 4 : currentState = "menu";break;
|
||
|
case 5 : currentState = "level_intro";break;
|
||
|
case 6 : currentState = "controlInstructions";break;
|
||
|
case 7 : currentState = "gameOver";break;
|
||
|
case 8 : currentState = "win";break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void render(GameContainer gc, Graphics g) {
|
||
|
// TODO Auto-generated method stub
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|