diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/animated_sprite.cpp | 2 | ||||
-rw-r--r-- | scene/resources/texture.cpp | 2 |
2 files changed, 3 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) { diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 26036c08a9..dcad70451e 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -2000,6 +2000,8 @@ void AnimatedTexture::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "frame_" + itos(i) + "/texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_texture", "get_frame_texture", i); ADD_PROPERTYI(PropertyInfo(Variant::REAL, "frame_" + itos(i) + "/delay_sec", PROPERTY_HINT_RANGE, "0.0,16.0,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_delay", "get_frame_delay", i); } + + BIND_CONSTANT(MAX_FRAMES); } AnimatedTexture::AnimatedTexture() { |