-
-
Notifications
You must be signed in to change notification settings - Fork 899
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
Being able to add more time to a Timer
#2357
Labels
Comments
Sounds reasonable, I don't see any reason for keeping it final. |
@spydon Sure, I can make a PR if you want 🙂 |
6 tasks
spydon
pushed a commit
that referenced
this issue
Feb 21, 2023
As stated in #2357, the field `limit` of the class `Timer` had no reason to be final. By removing this keyword, we make it possible to add more time to a given `Timer` object (so that they can be used as a countdown for example).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What could be improved
Currently, it isn't possible to change the elapsed time of a
Timer
. It's also not possible to change the limit.I think this could easily be improved by removing the
final
keyword of thelimit
variable in theTimer
class.Why should this be improved
I use timers in my game as a countdown before the player dies in a level. But some objects should act as bonus that give some time to the player.
What I've done so far is that I've created a
MutableTimer
class that allows me to change the limit :but it really is a workaround.
Any risks?
Not to my knowledge.
The text was updated successfully, but these errors were encountered: