Implemented sprite animation for the hero.