libgdx / gdx-ai

Artificial Intelligence framework for games based on libGDX or not. Features: Steering Behaviors, Formation Motion, Pathfinding, Behavior Trees and Finite State Machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there something wrong here in Parallel?

hl845740757 opened this issue · comments

Issue details

It seems that reset should be replaced by resettask

 
	public void resetAllChildren() {
		for (int i = 0, n = getChildCount(); i < n; i++) {
			Task<E> child = getChild(i);
			child.reset();
		}
	}
       //  Orchestrator.Join
        if (parallel.lastResult != null) { // Current child has finished either with success or fail
            parallel.cancelRunningChildren(parallel.noRunningTasks ? parallel.currentChildIndex + 1 : 0);
            parallel.resetAllChildren();
            if (parallel.lastResult)
                parallel.success();
            else
                parallel.fail();
            return;
        }

Version of gdx-ai and/or relevant dependencies

1.8.2