-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement AnimationPlayer pause() and resume() #44345
Implement AnimationPlayer pause() and resume() #44345
Conversation
We discussed this in a PR review meeting and the general consensus is that it's good, but there are a few things to look further into:
|
The
This is one of the issues raised in godotengine/godot-proposals#1994: the need for standardising the naming of
|
3ff5bdb
to
c4f7828
Compare
Updated to include two new commits:
|
c4f7828
to
a3a871b
Compare
a3a871b
to
1ac8610
Compare
Rebased following merge of #44630. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks fine, just few notes and a question (non stopping).
1ac8610
to
4b2982a
Compare
Rebased following merge of #47140. |
The removal of
This is useful sometimes even if it's not really "correct" way to do animations (it reduces code complexity for simple objects). |
4b2982a
to
ab7999b
Compare
Ensures that play() always plays the specified or current animation from the beginning. Also fixes stop() not resetting the animation.
- Removes play_backwards() - Removes start() from_end parameter. If custom_speed is negative, it will automatically play the animation backwards from the end.
ab7999b
to
6667d91
Compare
Updated documentation using |
This PR is now redundant given #46191 has been merged, so I am going to close it. |
#56645 is a salvage of this PR, because #46191 does not implement godotengine/godot-proposals#287, fix #27499 or fix #36279. Furthermore, pausing (and unpausing) the entire SceneTree is not a convenient way of pausing and resuming an AnimationPlayer's playing animation. |
As originally identified in #34125 and elaborated on in godotengine/godot-proposals#287, in
AnimationPlayer
:Similarly,
AnimationPlayer:stop()
has a parameter that defaults totrue
to either stop and reset the animation or just pause the animation. However, as identified in #27499, althoughstop(true)
resets the playback position it doesn't reset the animation.This PR:
AnimationPlayer
:pause()
andresume()
.pause()
will pause a currently playing animation, andresume()
will resume apaused()
animation.Closes godotengine/godot-proposals#287
Fixes #27499
Fixes #36279
Supersedes #33733