From 69dee7fd17f76397daa6e74eb6d78110aaa35201 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Fri, 20 Feb 2015 00:58:27 +0100 Subject: Board,Map,Ctrl: move annimation count to Board --- core/src/ch/asynk/tankontank/engine/Board.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'core/src/ch/asynk/tankontank/engine') diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index b307ee76..e7e31057 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); -- cgit v1.2.3