Fixed signal animation_finished
The signal animation_finished is now fired after all values have been changed so changes to the animation can be done without animation_finished without generating unexpected behavior.
This commit is contained in:
parent
c48027af92
commit
1c75603ff5
1 changed files with 4 additions and 4 deletions
|
@ -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++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue