Sets a functor that will be called upon changing the state of a specific animation. The method has an options:
Animation states: