From 0d25d8e7fcb9db82e2017de3ca5281fcd28ddcf5 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Sat, 26 Nov 2022 17:00:38 +0300 Subject: `AnimatedSprite{2D,3D}` improvements * Add support for individual frame duration to `SpriteFrames`. * Various minor improvements. --- scene/2d/animated_sprite_2d.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scene/2d/animated_sprite_2d.h') diff --git a/scene/2d/animated_sprite_2d.h b/scene/2d/animated_sprite_2d.h index 11c4adb816..3195bd7161 100644 --- a/scene/2d/animated_sprite_2d.h +++ b/scene/2d/animated_sprite_2d.h @@ -43,7 +43,7 @@ class AnimatedSprite2D : public Node2D { bool backwards = false; StringName animation = "default"; int frame = 0; - float speed_scale = 1.0f; + float speed_scale = 1.0; bool centered = true; Point2 offset; @@ -94,8 +94,8 @@ public: void set_frame(int p_frame); int get_frame() const; - void set_speed_scale(double p_speed_scale); - double get_speed_scale() const; + void set_speed_scale(float p_speed_scale); + float get_speed_scale() const; void set_centered(bool p_center); bool is_centered() const; -- cgit v1.2.3