summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorJakub Grzesik <kubecz3k@gmail.com>2016-04-14 17:19:20 +0200
committerJakub Grzesik <kubecz3k@gmail.com>2016-04-14 17:19:20 +0200
commitfd9b82a082c5122df5dffeda4d2d90adf31e2a42 (patch)
tree7af9d27997c587a98293291a57ea0daaa018252b /scene/animation
parentc0576c64da3fb03f63922fa572897b1a80e606e4 (diff)
animation_started signal to AnimationPlayer
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_player.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 32958112e5..25f49a8a8b 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1012,6 +1012,8 @@ void AnimationPlayer::play(const StringName& p_name, float p_custom_blend, float
queued.clear();
_set_process(true); // always process when starting an animation
playing = true;
+
+ emit_signal(SceneStringNames::get_singleton()->animation_started, c.assigned);
if (is_inside_tree() && get_tree()->is_editor_hint())
return; // no next in this case
@@ -1347,6 +1349,7 @@ void AnimationPlayer::_bind_methods() {
ADD_SIGNAL( MethodInfo("finished") );
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_IDLE );