|
@@ -604,10 +604,14 @@ bool AnimatedSprite::_is_playing() const {
|
|
|
|
|
|
void AnimatedSprite::play(const StringName &p_animation, const bool p_backwards) {
|
|
|
|
|
|
- if (p_animation)
|
|
|
+ backwards = p_backwards;
|
|
|
+
|
|
|
+ if (p_animation) {
|
|
|
set_animation(p_animation);
|
|
|
+ if (backwards && get_frame() == 0)
|
|
|
+ set_frame(frames->get_frame_count(p_animation) - 1);
|
|
|
+ }
|
|
|
|
|
|
- backwards = p_backwards;
|
|
|
_set_playing(true);
|
|
|
}
|
|
|
|