summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java7
-rw-r--r--core/src/ch/asynk/tankontank/screens/GameScreen.java4
2 files changed, 8 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 03ef812..06ccfde 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -88,6 +88,13 @@ public class Hud implements Disposable, Animation
return false;
}
+ public void draw(Batch batch, boolean debug)
+ {
+ draw(batch);
+ if (debug)
+ font.draw(batch, String.format("FPS: %d", Gdx.graphics.getFramesPerSecond()), 80, 25);
+ }
+
@Override
public void draw(Batch batch)
{
diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java
index aa844c8..8d7a8b3 100644
--- a/core/src/ch/asynk/tankontank/screens/GameScreen.java
+++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java
@@ -208,9 +208,7 @@ public class GameScreen implements Screen
hudCam.update();
hudBatch.setProjectionMatrix(hudCam.combined);
hudBatch.begin();
- ctrl.hud.draw(hudBatch);
- if (DEBUG)
- game.skin.getFont("default-font").draw(hudBatch, String.format("FPS: %d", Gdx.graphics.getFramesPerSecond()), 80, 25);
+ ctrl.hud.draw(hudBatch, DEBUG);
hudBatch.end();
if (DEBUG) {