Improved attackState and character movement

and fixed bugs in mjAABB and improved mjAutomaton