diff options
author | Gilles Roudiere <gilles.roudiere@gmail.com> | 2019-01-27 17:31:55 +0100 |
---|---|---|
committer | Gilles Roudiere <gilles.roudiere@gmail.com> | 2019-01-27 17:31:55 +0100 |
commit | 30dd1815e49f8060686a5df7103161ac2753077b (patch) | |
tree | c313c62acbf0c7a2e004b699db13cea2cfbb5191 /scene/2d/animated_sprite.cpp | |
parent | b494de34aa28e6c562e5ac8e767db1245b37bd8f (diff) |
Change the frame number before triggering the animation_finished signal
Diffstat (limited to 'scene/2d/animated_sprite.cpp')
-rw-r--r-- | scene/2d/animated_sprite.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index 707e95e271..28ddf6b5f8 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -395,8 +395,8 @@ void AnimatedSprite::_notification(int p_what) { int fc = frames->get_frame_count(animation); if (frame >= fc - 1) { if (frames->get_animation_loop(animation)) { - emit_signal(SceneStringNames::get_singleton()->animation_finished); frame = 0; + emit_signal(SceneStringNames::get_singleton()->animation_finished); } else { frame = fc - 1; if (!is_over) { |