فهرست منبع

Merge pull request #23930 from zer0problem/master

AnimatedSprite: Fixed signal animation_finished
Rémi Verschelde 6 سال پیش
والد
کامیت
aa63b86feb
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      scene/2d/animated_sprite.cpp

+ 2 - 2
scene/2d/animated_sprite.cpp

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