AnimationController:setActiveAnimation(String name)

AnimationController has a method setActiveAnimation(String name)



I was curious why the BoneAnimations were held in an ArrayList instead of trhough a map if they were intended to be accessed through a string.



Also addAnimation(BoneAnimation bac) doesn't check for other animations of the same name nor is there a direct way to tell if there is an existing animation of that name. So if you add an animation without removing the other with the same name(because you didn't know it was there) your animation that you just added wont be the one that's active after a call to setActiveAnimation(String name)

They were held in an array list originally, because all animation switching was done by directly calling the bone animation. It wasn't until that was in place that the string name call was needed for what we were doing. You're right, a Map may be a much more optimal route to go now. I wouldn't expect any big improvements, as animation switching will be happening only once in awhile in the grand scheme of things, but every little bit helps.



The Map will also fix your second point.