diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-21 21:15:53 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-21 21:15:53 +0100 |
commit | 04159917bc94e04ad96c5b2a2012045f7e6adb58 (patch) | |
tree | 181c29cbae289d05ae70274d909f8fe9db81701f | |
parent | 7f1b60094b5d351c58194feabad1fef903d1d3be (diff) | |
download | RustAndDust-04159917bc94e04ad96c5b2a2012045f7e6adb58.zip RustAndDust-04159917bc94e04ad96c5b2a2012045f7e6adb58.tar.gz |
PathBuilder: extract clearPaths() from clear()
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/PathBuilder.java | 5 |
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(); |