Try to walk only when the hero moves. Problem to access animation outside of the init method.
megaman is walking right !