Skip to content
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

Add a method on Timer to get the remaining time #5963

Closed
alice-i-cecile opened this issue Sep 12, 2022 · 1 comment
Closed

Add a method on Timer to get the remaining time #5963

alice-i-cecile opened this issue Sep 12, 2022 · 1 comment
Labels
A-Utils Utility functions and types C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@alice-i-cecile
Copy link
Member

What problem does this solve or what need does it fill?

Getting the remaining time is a natural operation, and particularly useful when working with cooldowns or countdowns.

What solution would you like?

Add a remaining() method to Timer.

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Utils Utility functions and types labels Sep 12, 2022
@Sergi-Ferrez
Copy link
Contributor

Working on this!

@bors bors bot closed this as completed in 619c44f Sep 14, 2022
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 19, 2022
# Objective

Fixes bevyengine#5963 

## Solution

Add remaining fn in Timer class, this function only minus total duration with elapsed time.

Co-authored-by: Sergi-Ferrez <61662926+Sergi-Ferrez@users.noreply.github.com>
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 28, 2022
# Objective

Fixes bevyengine#5963 

## Solution

Add remaining fn in Timer class, this function only minus total duration with elapsed time.

Co-authored-by: Sergi-Ferrez <61662926+Sergi-Ferrez@users.noreply.github.com>
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective

Fixes bevyengine#5963 

## Solution

Add remaining fn in Timer class, this function only minus total duration with elapsed time.

Co-authored-by: Sergi-Ferrez <61662926+Sergi-Ferrez@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Utils Utility functions and types C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants