Merge pull request #23930 from zer0problem/master

AnimatedSprite: Fixed signal animation_finished
This commit is contained in:
Rémi Verschelde 2018-11-23 21:02:27 +01:00 committed by GitHub
commit aa63b86feb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -398,11 +398,11 @@ void AnimatedSprite::_notification(int p_what) {
emit_signal(SceneStringNames::get_singleton()->animation_finished); emit_signal(SceneStringNames::get_singleton()->animation_finished);
frame = 0; frame = 0;
} else { } else {
if (!is_over) {
emit_signal(SceneStringNames::get_singleton()->animation_finished);
is_over = true;
}
frame = fc - 1; frame = fc - 1;
if (!is_over) {
is_over = true;
emit_signal(SceneStringNames::get_singleton()->animation_finished);
}
} }
} else { } else {
frame++; frame++;