Sprite switching callback now called every animation frame instead of after every step.