HUD for StandardLevel

This commit is contained in:
2015-09-25 15:30:50 +02:00
parent bf46dfd1b6
commit 26badd541b
4 changed files with 109 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ package de.samdev.cannonshooter.level;
import java.util.ArrayList;
import java.util.List;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.math.Vector2;
import de.samdev.absgdx.framework.AgdxGame;
@@ -10,6 +12,7 @@ import de.samdev.absgdx.framework.layer.GameLayer;
import de.samdev.absgdx.framework.map.TileMap;
import de.samdev.absgdx.framework.map.background.RepeatingBackground;
import de.samdev.absgdx.framework.map.mapscaleresolver.ShowCompleteMapScaleResolver;
import de.samdev.absgdx.framework.util.exceptions.AgdxmlParsingException;
import de.samdev.cannonshooter.Textures;
import de.samdev.cannonshooter.entities.Cannon;
import de.samdev.cannonshooter.teams.Team;
@@ -32,6 +35,12 @@ public class StandardLevel extends GameLayer {
initMap();
try {
setHUDFromAgdxml(Gdx.files.internal("standard_hud.agdxml"), Textures.spritesheet, new BitmapFont(Gdx.files.internal("consolefont.fnt")));
} catch (AgdxmlParsingException e) {
throw new RuntimeException(e);
}
//setTimeMultiplier(3);
}