LOLOOOOOOL
This commit is contained in:
parent
69adb14553
commit
88d92f1b96
4 changed files with 62 additions and 7 deletions
|
|
@ -5,25 +5,32 @@ import ei.engine.state.GameState;
|
|||
import ei.game.input.InGameMouseInput;
|
||||
import ei.game.player.Human;
|
||||
import ei.game.scene.Map;
|
||||
import ei.game.scene.units.Tank;
|
||||
|
||||
|
||||
public class InGameState extends GameState{
|
||||
private Node rootNode;
|
||||
private Map map;
|
||||
private Human player;
|
||||
private static Map map;
|
||||
private static Human player;
|
||||
|
||||
public InGameState(String name){
|
||||
super(name);
|
||||
rootNode = new Node("InGameNode");
|
||||
|
||||
|
||||
map = new Map(20,20);
|
||||
rootNode.add(map.getMapNode());
|
||||
|
||||
InGameMouseInput mouse = new InGameMouseInput(map);
|
||||
super.getInput().addInput(mouse);
|
||||
|
||||
|
||||
player = new Human();
|
||||
rootNode.add(player.getNode());
|
||||
Tank tank = new Tank();
|
||||
player.addUnit(tank);
|
||||
tank.move(10, 10);
|
||||
}
|
||||
public static Human getHuman(){
|
||||
return player;
|
||||
}
|
||||
|
||||
public void render() {
|
||||
|
|
@ -33,5 +40,8 @@ public class InGameState extends GameState{
|
|||
public void update() {
|
||||
rootNode.update();
|
||||
}
|
||||
public static Map getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue