diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-03-17 04:03:23 -0300 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-03-17 04:03:23 -0300 |
commit | 4a2c4330281f46d8a63ced05459e22a7d8895652 (patch) | |
tree | 1ebf1006cd75c69df9de11919e89ebbbb5d8f225 /scene/2d/animated_sprite.h | |
parent | df7d3708c5b535c3696943322a14ec19a175e30c (diff) | |
download | redot-engine-4a2c4330281f46d8a63ced05459e22a7d8895652.tar.gz |
Make AnimatedSprite able to play backwards
Diffstat (limited to 'scene/2d/animated_sprite.h')
-rw-r--r-- | scene/2d/animated_sprite.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/2d/animated_sprite.h b/scene/2d/animated_sprite.h index 8753f88799..2cc372bd93 100644 --- a/scene/2d/animated_sprite.h +++ b/scene/2d/animated_sprite.h @@ -128,6 +128,7 @@ class AnimatedSprite : public Node2D { Ref<SpriteFrames> frames; bool playing; + bool backwards; StringName animation; int frame; float speed_scale; @@ -169,7 +170,7 @@ public: void set_sprite_frames(const Ref<SpriteFrames> &p_frames); Ref<SpriteFrames> get_sprite_frames() const; - void play(const StringName &p_animation = StringName()); + void play(const StringName &p_animation = StringName(), const bool p_backwards = false); void stop(); bool is_playing() const; |