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
|
|
@ -4,6 +4,7 @@ import ei.engine.scene.Node;
|
|||
import ei.engine.sound.Sound;
|
||||
import ei.engine.state.GameState;
|
||||
import ei.game.hud.InGameHud;
|
||||
import ei.game.input.InGameKeyboardInput;
|
||||
import ei.game.input.InGameMouseInput;
|
||||
import ei.game.player.HumanPlayer;
|
||||
import ei.game.player.PlayerHandler;
|
||||
|
|
@ -22,12 +23,21 @@ public class InGameState extends GameState{
|
|||
|
||||
public InGameState(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
PlayerHandler.getInstance().clear();
|
||||
WeaponHandler.getInstance().clear();
|
||||
|
||||
rootNode = new Node("InGameNode");
|
||||
|
||||
map = new Map(20,20);
|
||||
map.init("data/map/default");
|
||||
InGameMouseInput mouse = new InGameMouseInput(map);
|
||||
super.getInput().addInput(mouse);
|
||||
InGameKeyboardInput keyboard = new InGameKeyboardInput();
|
||||
super.getInput().addInput(keyboard);
|
||||
|
||||
HumanPlayer player = new HumanPlayer();
|
||||
Tank t1 = new Tank(player);
|
||||
|
|
@ -40,7 +50,6 @@ public class InGameState extends GameState{
|
|||
player.addUnit(new Bomber(7, 0, player));
|
||||
player.addUnit(new APU(4, 0, player));
|
||||
player.addUnit(new APU(5, 0, player));
|
||||
//player.addUnit(new CommandCenter(10, 10, player));
|
||||
|
||||
PlayerHandler.getInstance().addPlayer(player);
|
||||
|
||||
|
|
@ -53,7 +62,7 @@ public class InGameState extends GameState{
|
|||
rootNode.add(hud.getNode());
|
||||
|
||||
music = new Sound("music", "data/sounds/ei.ogg");
|
||||
music.loop();
|
||||
music.loop();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -81,5 +90,4 @@ public class InGameState extends GameState{
|
|||
public static Map getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue