Add animation_changed signal to AnimationLibrary

AnimationLibrary now listens for the animation_changed signal on its
animations and emits this new signal, with the animation name added
on. AnimationPlayer now connects to this signal rather than connecting
to each individual animation, which was poor practice due to bypassing
encapsulation.
This commit is contained in:
Jonathan Nicholl
2022-06-11 21:14:40 -04:00
parent 11e1c83309
commit f8021dae9c
5 changed files with 26 additions and 42 deletions

View File

@ -291,9 +291,7 @@ private:
return ret;
}
void _animation_changed();
void _ref_anim(const Ref<Animation> &p_anim);
void _unref_anim(const Ref<Animation> &p_anim);
void _animation_changed(const StringName &p_name);
void _set_process(bool p_process, bool p_force = false);