bevy/crates/bevy_core/src/time
devil ira 3f423074bf Make paused timers update just_finished on tick (#4445)
# Objective
Make timers update `just_finished` on tick, even if paused.
Fixes #4436

## Solution
`just_finished()` returns `times_finished > 0`. So I:
 * Renamed `times_finished` to `times_finished_this_tick` to reduce confusion.
 * Set `times_finished_this_tick` to `0` on tick when paused.
 * Additionally set `finished` to `false` if the timer is repeating.

Notably this change broke none of the existing tests, so I added a couple for this.

Files changed shows a lot of noise because of the rename. Check the first commit for the relevant changes.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
2022-04-26 18:42:42 +00:00
..
fixed_timestep.rs Make System responsible for updating its own archetypes (#4115) 2022-04-07 20:50:43 +00:00
mod.rs ♻️ Timer refactor to duration. Add Stopwatch struct. (#1151) 2021-03-05 19:59:14 +00:00
stopwatch.rs Cleanup some things which shouldn't be components (#2982) 2022-02-03 23:56:57 +00:00
time.rs Make Time::update_with_instant public for use in tests (#4469) 2022-04-24 23:15:27 +00:00
timer.rs Make paused timers update just_finished on tick (#4445) 2022-04-26 18:42:42 +00:00