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