summaryrefslogtreecommitdiffstats
path: root/scene/2d/animated_sprite_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/animated_sprite_2d.cpp')
-rw-r--r--scene/2d/animated_sprite_2d.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp
index 37e9d1f8c1..f543412962 100644
--- a/scene/2d/animated_sprite_2d.cpp
+++ b/scene/2d/animated_sprite_2d.cpp
@@ -202,7 +202,7 @@ void AnimatedSprite2D::_notification(int p_what) {
} else {
frame = last_frame;
pause();
- emit_signal(SceneStringNames::get_singleton()->animation_finished);
+ emit_signal(SceneStringName(animation_finished));
return;
}
} else {
@@ -211,7 +211,7 @@ void AnimatedSprite2D::_notification(int p_what) {
_calc_frame_speed_scale();
frame_progress = 0.0;
queue_redraw();
- emit_signal(SceneStringNames::get_singleton()->frame_changed);
+ emit_signal(SceneStringName(frame_changed));
}
double to_process = MIN((1.0 - frame_progress) / abs_speed, remaining);
frame_progress += to_process * abs_speed;
@@ -226,7 +226,7 @@ void AnimatedSprite2D::_notification(int p_what) {
} else {
frame = 0;
pause();
- emit_signal(SceneStringNames::get_singleton()->animation_finished);
+ emit_signal(SceneStringName(animation_finished));
return;
}
} else {
@@ -235,7 +235,7 @@ void AnimatedSprite2D::_notification(int p_what) {
_calc_frame_speed_scale();
frame_progress = 1.0;
queue_redraw();
- emit_signal(SceneStringNames::get_singleton()->frame_changed);
+ emit_signal(SceneStringName(frame_changed));
}
double to_process = MIN(frame_progress / abs_speed, remaining);
frame_progress -= to_process * abs_speed;
@@ -291,12 +291,12 @@ void AnimatedSprite2D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) {
}
if (frames.is_valid()) {
- frames->disconnect(SceneStringNames::get_singleton()->changed, callable_mp(this, &AnimatedSprite2D::_res_changed));
+ frames->disconnect(SceneStringName(changed), callable_mp(this, &AnimatedSprite2D::_res_changed));
}
stop();
frames = p_frames;
if (frames.is_valid()) {
- frames->connect(SceneStringNames::get_singleton()->changed, callable_mp(this, &AnimatedSprite2D::_res_changed));
+ frames->connect(SceneStringName(changed), callable_mp(this, &AnimatedSprite2D::_res_changed));
List<StringName> al;
frames->get_animation_list(&al);
@@ -363,7 +363,7 @@ void AnimatedSprite2D::set_frame_and_progress(int p_frame, real_t p_progress) {
return; // No change, don't redraw.
}
queue_redraw();
- emit_signal(SceneStringNames::get_singleton()->frame_changed);
+ emit_signal(SceneStringName(frame_changed));
}
void AnimatedSprite2D::set_speed_scale(float p_speed_scale) {