package ei.game.gamestate; import ei.engine.scene.Node; 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 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, 3); } public static Human getHuman(){ return player; } public void render() { rootNode.render(); } public void update() { rootNode.update(); } public static Map getMap() { return map; } }