animation_started signal to AnimationPlayer
This commit is contained in:
parent
c0576c64da
commit
fd9b82a082
3 changed files with 5 additions and 0 deletions
|
@ -1013,6 +1013,8 @@ void AnimationPlayer::play(const StringName& p_name, float p_custom_blend, float
|
||||||
_set_process(true); // always process when starting an animation
|
_set_process(true); // always process when starting an animation
|
||||||
playing = true;
|
playing = true;
|
||||||
|
|
||||||
|
emit_signal(SceneStringNames::get_singleton()->animation_started, c.assigned);
|
||||||
|
|
||||||
if (is_inside_tree() && get_tree()->is_editor_hint())
|
if (is_inside_tree() && get_tree()->is_editor_hint())
|
||||||
return; // no next in this case
|
return; // no next in this case
|
||||||
|
|
||||||
|
@ -1347,6 +1349,7 @@ void AnimationPlayer::_bind_methods() {
|
||||||
|
|
||||||
ADD_SIGNAL( MethodInfo("finished") );
|
ADD_SIGNAL( MethodInfo("finished") );
|
||||||
ADD_SIGNAL( MethodInfo("animation_changed", PropertyInfo(Variant::STRING,"old_name"), PropertyInfo(Variant::STRING,"new_name")) );
|
ADD_SIGNAL( MethodInfo("animation_changed", PropertyInfo(Variant::STRING,"old_name"), PropertyInfo(Variant::STRING,"new_name")) );
|
||||||
|
ADD_SIGNAL( MethodInfo("animation_started", PropertyInfo(Variant::STRING,"name")) );
|
||||||
|
|
||||||
BIND_CONSTANT( ANIMATION_PROCESS_FIXED );
|
BIND_CONSTANT( ANIMATION_PROCESS_FIXED );
|
||||||
BIND_CONSTANT( ANIMATION_PROCESS_IDLE );
|
BIND_CONSTANT( ANIMATION_PROCESS_IDLE );
|
||||||
|
|
|
@ -52,6 +52,7 @@ SceneStringNames::SceneStringNames() {
|
||||||
|
|
||||||
finished=StaticCString::create("finished");
|
finished=StaticCString::create("finished");
|
||||||
animation_changed=StaticCString::create("animation_changed");
|
animation_changed=StaticCString::create("animation_changed");
|
||||||
|
animation_started=StaticCString::create("animation_started");
|
||||||
|
|
||||||
mouse_enter=StaticCString::create("mouse_enter");
|
mouse_enter=StaticCString::create("mouse_enter");
|
||||||
mouse_exit=StaticCString::create("mouse_exit");
|
mouse_exit=StaticCString::create("mouse_exit");
|
||||||
|
|
|
@ -79,6 +79,7 @@ public:
|
||||||
|
|
||||||
StringName finished;
|
StringName finished;
|
||||||
StringName animation_changed;
|
StringName animation_changed;
|
||||||
|
StringName animation_started;
|
||||||
|
|
||||||
StringName body_enter_shape;
|
StringName body_enter_shape;
|
||||||
StringName body_enter;
|
StringName body_enter;
|
||||||
|
|
Loading…
Reference in a new issue