Added a main menu and fixed som things. added explotions to and fixed the economy
This commit is contained in:
parent
5bb373573d
commit
88771fad29
56 changed files with 1859 additions and 1999 deletions
|
|
@ -1,5 +1,31 @@
|
|||
package ei.game.input;
|
||||
|
||||
public class InGameKeyboardInput {
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import ei.engine.LWJGLGameWindow;
|
||||
import ei.engine.input.KeyboardInput;
|
||||
import ei.engine.state.GameStateManager;
|
||||
|
||||
public class InGameKeyboardInput extends KeyboardInput{
|
||||
|
||||
public InGameKeyboardInput() {
|
||||
super("InGameKeyboardInput");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyDown(int keycode) {
|
||||
if (Keyboard.KEY_ESCAPE == keycode) {
|
||||
if(GameStateManager.getInstance().getState("MenuState") != null){
|
||||
GameStateManager.getInstance().setDeActive("InGameState");
|
||||
GameStateManager.getInstance().setActive("MenuState");
|
||||
}
|
||||
else{
|
||||
LWJGLGameWindow.exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyUp(int keycode) {}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue