summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-09 12:02:26 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-09 12:02:26 +0100
commit312b67edb89dbdb8605a6b537acca1b69add126d (patch)
treef082a58bcaa562fd086fba5b0eae083bc31b6ef4 /core/src/ch/asynk/rustanddust/engine
parentcd27d013c29633f05d3db963b09c37c9397b684a (diff)
downloadRustAndDust-312b67edb89dbdb8605a6b537acca1b69add126d.zip
RustAndDust-312b67edb89dbdb8605a6b537acca1b69add126d.tar.gz
Board: forgot to dispose() the animation that is finished
Diffstat (limited to 'core/src/ch/asynk/rustanddust/engine')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/Board.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Board.java b/core/src/ch/asynk/rustanddust/engine/Board.java
index 21ad9b7..792dad0 100644
--- a/core/src/ch/asynk/rustanddust/engine/Board.java
+++ b/core/src/ch/asynk/rustanddust/engine/Board.java
@@ -257,8 +257,10 @@ public abstract class Board implements Disposable, Animation
Iterator<Animation> iter = animations.iterator();
while (iter.hasNext()) {
Animation a = iter.next();
- if (a.animate(delta))
+ if (a.animate(delta)) {
iter.remove();
+ a.dispose();
+ }
}
if (over && (animations.size() == 0))
animationsOver();