diff --git a/gdx-ai/src/com/badlogic/gdx/ai/btree/Task.java b/gdx-ai/src/com/badlogic/gdx/ai/btree/Task.java index d49a48f9..30f29d75 100644 --- a/gdx-ai/src/com/badlogic/gdx/ai/btree/Task.java +++ b/gdx-ai/src/com/badlogic/gdx/ai/btree/Task.java @@ -246,7 +246,6 @@ public void resetTask () { getChild(i).resetTask(); } status = Status.FRESH; - tree = null; control = null; } diff --git a/gdx-ai/src/com/badlogic/gdx/ai/btree/branch/Parallel.java b/gdx-ai/src/com/badlogic/gdx/ai/btree/branch/Parallel.java index 95a7f6ba..648105a2 100644 --- a/gdx-ai/src/com/badlogic/gdx/ai/btree/branch/Parallel.java +++ b/gdx-ai/src/com/badlogic/gdx/ai/btree/branch/Parallel.java @@ -220,7 +220,7 @@ public void execute(Parallel parallel) { if (parallel.lastResult != null) { // Current child has finished either with success or fail parallel.cancelRunningChildren(parallel.noRunningTasks ? parallel.currentChildIndex + 1 : 0); - parallel.resetAllChildren(); + parallel.resetTask(); if (parallel.lastResult) parallel.success(); else diff --git a/tests/build.gradle b/tests/build.gradle index dad7d1f1..c25239ea 100755 --- a/tests/build.gradle +++ b/tests/build.gradle @@ -4,6 +4,11 @@ sourceCompatibility = 1.7 sourceSets.main.java.srcDirs = [ "src/" ] +// add below setting for gdx-ai +sourceSets.main.resources.srcDirs = ["./"] +project.ext.assetsDir = new File(".") + + dependencies { implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"