mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-17 13:18:03 +08:00
Fixing addLater component lifecycle
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
## [next]
|
||||
- Fixing component lifecycle calls on Component#addLater
|
||||
|
||||
## 0.18.3
|
||||
- Adding Component#onDestroy
|
||||
|
||||
@@ -229,7 +229,7 @@ abstract class BaseGame extends Game with TapDetector {
|
||||
/// You can override it further to add more custom behaviour.
|
||||
@override
|
||||
void update(double t) {
|
||||
components.addAll(_addLater);
|
||||
_addLater.forEach(add);
|
||||
_addLater.clear();
|
||||
|
||||
components.forEach((c) => c.update(t));
|
||||
|
||||
Reference in New Issue
Block a user