-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Rename the method stop() to pause() in AnimatedSprite. #31168
Comments
I agree, stop should set it back to the beginning. Although, I would imagine this would break compatibility. Perhaps a boolean parameter can be added to stop which defaults to false, meaning it will stop animation but not reset the frame. That way it will work the same and not break compatibility. It will still "pause", but if you want to stop the animation and reset to the beginning, you can do something like: Or maybe you can supply a frame number to stop and -1 would keep it on the current frame. |
This should be consistent with Worth noting that you can specify the initial position/time in |
the parameter for stop (bool reset = true) makes the stop/pause issue objective this is good i think. |
Having stop() and pause() is self-explanatory as this is widely spread knowledge in many other areas of living. |
Just wanted to comment, the documentation might be wrong (well I guess it is right, but the overall effect is wrong). Stop acts as a pause, but when you play(), the frame resets to zero.
|
I am still very confused can someone write out an example for a novice. where and how do you set the parameter stop (bool reset = true) |
Similarly, |
Closing, as this renaming request is now tracked in #16863. |
Note there is also this proposal for further discussion: |
Usually the word stop is used when you wanna pause something and when you continue with it, it will start from the beginning. Instead the word pause is used when you wanna continue with the thing from where you left it. You can read more here if it's not clear:
https://www.differencebetween.com/difference-between-pause-and-vs-stop/
Right now, the method stop() in AnimatedSprite is working as a pause (it is even stated in the documentation saying it doesn't reset the frame counter), so what i propose is to change the name of the method stop() to pause.
https://docs.godotengine.org/en/3.1/classes/class_animatedsprite.html#class-animatedsprite-method-stop
In case you wanna keep the method stop, then after the pause, you should set the frame of the animation to zero, but for that we could open another issue.
The text was updated successfully, but these errors were encountered: