<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_animation(self, animation_class):
 """Add a new animation"""

        self.state.animationClasses.append(animation_class)
        return len(self.state.animationClasses) - 1