summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/animations/MoveAnimation.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/animations/MoveAnimation.java b/core/src/ch/asynk/gdx/boardgame/animations/MoveAnimation.java
index 45b355e..e47eb3a 100644
--- a/core/src/ch/asynk/gdx/boardgame/animations/MoveAnimation.java
+++ b/core/src/ch/asynk/gdx/boardgame/animations/MoveAnimation.java
@@ -104,10 +104,8 @@ public class MoveAnimation implements Animation, Pool.Poolable
piece.rotate(dt.z * delta);
percent += (dp * delta);
- if (notify && percent >= 0.5) {
- if (cb != null) {
- cb.onTileChange(piece, path);
- }
+ if (notify && cb != null && percent >= 0.5f) {
+ cb.onTileChange(piece, path);
notify = false;
}
if (percent >= 1f) {