summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-21 21:15:53 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-21 21:15:53 +0100
commit04159917bc94e04ad96c5b2a2012045f7e6adb58 (patch)
tree181c29cbae289d05ae70274d909f8fe9db81701f /core/src
parent7f1b60094b5d351c58194feabad1fef903d1d3be (diff)
downloadRustAndDust-04159917bc94e04ad96c5b2a2012045f7e6adb58.zip
RustAndDust-04159917bc94e04ad96c5b2a2012045f7e6adb58.tar.gz
PathBuilder: extract clearPaths() from clear()
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/PathBuilder.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
index bebb045..e8435be 100644
--- a/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
+++ b/core/src/ch/asynk/rustanddust/engine/PathBuilder.java
@@ -70,6 +70,11 @@ public class PathBuilder implements Disposable
this.to = null;
this.distance = -1;
this.orientation = Orientation.KEEP;
+ this.clearPaths();
+ }
+
+ private void clearPaths()
+ {
for (Path path : this.paths) path.dispose();
this.tiles.clear();
this.stack.clear();