mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-08 07:42:14 +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
|
- Fixes aseprite constructor bug
|
||||||
- Improve error handling for the onLoad function
|
- Improve error handling for the onLoad function
|
||||||
- Add test for child removal
|
- 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
|
## 1.0.0-rc5
|
||||||
- Option for overlays to be already visible on the GameWidget
|
- Option for overlays to be already visible on the GameWidget
|
||||||
|
|||||||
@ -29,6 +29,7 @@ class Timer {
|
|||||||
if (_current >= limit) {
|
if (_current >= limit) {
|
||||||
if (!repeat) {
|
if (!repeat) {
|
||||||
_running = false;
|
_running = false;
|
||||||
|
callback?.call();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// This is used to cover the rare case of _current being more than
|
// This is used to cover the rare case of _current being more than
|
||||||
|
|||||||
Reference in New Issue
Block a user