mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-08 15:54:31 +08:00
Ensure non-repeating Timer callback fires (#610)
This commit is contained in:
committed by
GitHub
parent
6e98b07884
commit
24433c18a0
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user