diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2022-11-26 17:00:38 +0300 |
---|---|---|
committer | Danil Alexeev <danil@alexeev.xyz> | 2023-01-05 13:13:25 +0300 |
commit | 0d25d8e7fcb9db82e2017de3ca5281fcd28ddcf5 (patch) | |
tree | 44ae09a8f6033f8562fa7aea1eac51eb174370a9 /scene/2d/animated_sprite_2d.h | |
parent | dc3175e4cdb4e54e1c6200b6c4d07646eea95284 (diff) |
`AnimatedSprite{2D,3D}` improvements
* Add support for individual frame duration to `SpriteFrames`.
* Various minor improvements.
Diffstat (limited to 'scene/2d/animated_sprite_2d.h')
-rw-r--r-- | scene/2d/animated_sprite_2d.h | 6 |
1 files changed, 3 insertions, 3 deletions
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; |