Skip to content
Snippets Groups Projects
Commit 3a6324ec authored by Magnus Segtnan Skjølberg's avatar Magnus Segtnan Skjølberg
Browse files

(#18): move hud instantiate before controller

parent 42436140
No related branches found
No related tags found
3 merge requests!51Resolve "Adjust cannon angle from touch input",!35Draft: Resolve "Adjust cannon angle from touch input",!32Combine hud with gameplay
......@@ -89,10 +89,11 @@ public class GameScreen implements Screen {
horizontalScaling = Gdx.graphics.getWidth() / TankWarsGame.GAMEPORT_WIDTH;
verticalScaling = Gdx.graphics.getHeight() / TankWarsGame.GAMEPORT_HEIGHT;
controller = new GameController(myTank, tankWarsGame, hud);
hud = new GameHud(new FitViewport(TankWarsGame.GAMEPORT_WIDTH, TankWarsGame.GAMEPORT_HEIGHT, hudCam), batch);
Gdx.input.setInputProcessor(hud.getStage());
controller = new GameController(myTank, tankWarsGame, hud);
Gdx.input.setInputProcessor(hud.getStage());
controller.handleHudEvents();
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment