evil-inside/src/ei/game/gamestate/InGameState.java

38 lines
741 B
Java
Raw Normal View History

package ei.game.gamestate;
import ei.engine.scene.Node;
import ei.engine.state.GameState;
import ei.game.input.InGameMouseInput;
2007-04-04 14:45:44 +00:00
import ei.game.player.Human;
import ei.game.scene.Map;
public class InGameState extends GameState{
private Node rootNode;
private Map map;
2007-04-04 14:45:44 +00:00
private Human player;
public InGameState(String name){
super(name);
rootNode = new Node("InGameNode");
2007-04-04 16:00:09 +00:00
map = new Map(20,20);
rootNode.add(map.getMapNode());
2007-04-04 16:00:09 +00:00
InGameMouseInput mouse = new InGameMouseInput(map);
super.getInput().addInput(mouse);
2007-04-04 14:45:44 +00:00
player = new Human();
rootNode.add(player.getNode());
}
public void render() {
rootNode.render();
}
public void update() {
2007-03-15 19:26:15 +00:00
rootNode.update();
}
}