Enhancement: sprite:get_num_frames()
Add a method sprite:get_num_frames() to get the number of frames of the current animation (or nil if there is no current animation).
This can be used to compute the duration of an animation (using also the method to get the delay between frames). Note that the duration of the animation could change if the quest maker modifies the animations in the Editor, so this avoids changing the code again in that case.