Added hud
This commit is contained in:
parent
7e309db351
commit
31692d8b4e
6 changed files with 110 additions and 64 deletions
|
|
@ -3,6 +3,7 @@ package ei.game.gamestate;
|
|||
import ei.engine.scene.Node;
|
||||
import ei.engine.sound.Sound;
|
||||
import ei.engine.state.GameState;
|
||||
import ei.game.hud.InGameHud;
|
||||
import ei.game.input.InGameMouseInput;
|
||||
import ei.game.player.HumanPlayer;
|
||||
import ei.game.player.PlayerHandler;
|
||||
|
|
@ -16,6 +17,7 @@ import ei.game.scene.weapons.WeaponHandler;
|
|||
|
||||
public class InGameState extends GameState{
|
||||
private Node rootNode;
|
||||
private InGameHud hud;
|
||||
private static Map map;
|
||||
private Sound music;
|
||||
|
||||
|
|
@ -49,6 +51,8 @@ public class InGameState extends GameState{
|
|||
music = new Sound("music", "data/sounds/ei.ogg");
|
||||
music.loop();
|
||||
|
||||
hud = new InGameHud(player);
|
||||
rootNode.add(hud.getNode());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -64,6 +68,7 @@ public class InGameState extends GameState{
|
|||
public void update() {
|
||||
PlayerHandler.getInstance().update();
|
||||
WeaponHandler.getInstance().update();
|
||||
hud.update();
|
||||
rootNode.update();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue