summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-13 12:02:38 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-13 12:02:38 +0200
commitdedfff66f917398a809afdfb609d0dbc8e7aa0b6 (patch)
tree47603e8da8bbc9006c991b0f0a22340db46e7604 /core/src/ch/asynk
parent65c68c16cfe0795b3539d864ec85a2e553cee99a (diff)
downloadRustAndDust-dedfff66f917398a809afdfb609d0dbc8e7aa0b6.zip
RustAndDust-dedfff66f917398a809afdfb609d0dbc8e7aa0b6.tar.gz
Board,Hud: add Board.getStats(), add tiles,animations count on debug msg
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/Board.java5
-rw-r--r--core/src/ch/asynk/rustanddust/game/Hud.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Board.java b/core/src/ch/asynk/rustanddust/engine/Board.java
index f7fed7e..f043446 100644
--- a/core/src/ch/asynk/rustanddust/engine/Board.java
+++ b/core/src/ch/asynk/rustanddust/engine/Board.java
@@ -66,6 +66,11 @@ public abstract class Board implements Disposable, Animation
abstract protected Config getConfig();
+ public String getStats()
+ {
+ return String.format("tiles:%d animations:%d", tilesToDraw.size(), animations.size());
+ }
+
protected Board(int cols, int rows)
{
this.block = 0f;
diff --git a/core/src/ch/asynk/rustanddust/game/Hud.java b/core/src/ch/asynk/rustanddust/game/Hud.java
index 936d8b0..e53dcac 100644
--- a/core/src/ch/asynk/rustanddust/game/Hud.java
+++ b/core/src/ch/asynk/rustanddust/game/Hud.java
@@ -126,7 +126,7 @@ public class Hud implements Disposable, Animation
{
draw(batch);
if (debug)
- game.font.draw(batch, String.format("FPS: %d", Gdx.graphics.getFramesPerSecond()), 80, 25);
+ game.font.draw(batch, String.format("FPS: %d - %s", Gdx.graphics.getFramesPerSecond(), ctrl.map.getStats()), 80, 25);
}
@Override