Ensure non-repeating Timer callback fires (#610)

This commit is contained in:
Christopher Casey
2021-01-05 17:12:39 -06:00
committed by GitHub
parent 6e98b07884
commit 24433c18a0
2 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@
- Fixes aseprite constructor bug
- Improve error handling for the onLoad function
- Add test for child removal
- Fix bug where `Timer` callback doesn't fire for non-repeating timers, also fixing bug with `Particle` lifespan
## 1.0.0-rc5
- Option for overlays to be already visible on the GameWidget

View File

@ -29,6 +29,7 @@ class Timer {
if (_current >= limit) {
if (!repeat) {
_running = false;
callback?.call();
return;
}
// This is used to cover the rare case of _current being more than