summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index b307ee7..e7e3105 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -218,9 +218,20 @@ public abstract class Board implements Disposable, Animation
protected void addAnimation(Animation a)
{
+ animationCount += 1;
nextAnimations.add(a);
}
+ protected void animationDone()
+ {
+ animationCount -= 1;
+ }
+
+ public int animationCount()
+ {
+ return animationCount;
+ }
+
private void stats()
{
boolean print = false;
@@ -230,10 +241,11 @@ public abstract class Board implements Disposable, Animation
print = true;
}
- if (animationCount != animations.size()) {
- animationCount = animations.size();
- print = true;
- }
+ // FIXME this will never be false
+ // if (animationCount != animations.size()) {
+ // animationCount = animations.size();
+ // print = true;
+ // }
if (print)
Gdx.app.debug("Board", " tiles:" + tileCount + " pawns:" + pawnCount + " animations:" + animationCount);