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
Apache License 2.0
1.18k stars 241 forks source link

RandomSelector start operation updated #52

Closed felixvolz closed 8 years ago

felixvolz commented 8 years ago

I've updated RandomSelector to set it in a known state each time it starts(). Pre this fix I was finding it may attempt to run in a state of runningChild = null and currentChildIndex = children.size. This meant none of its children would run.

davebaol commented 8 years ago

Good catch, thanks. :+1: Fixed same issue in RandomSequence.