Skip to content

Commit

Permalink
fix: onGameResize callback flame-engine#1305
Browse files Browse the repository at this point in the history
  • Loading branch information
mancj committed Jan 8, 2022
1 parent 2fbfd3d commit eae8150
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/flame/lib/src/components/component_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ class ComponentSet extends QueryableOrderedSet<Component> {
_addLater.forEach((c) {
super.add(c);
c.isMounted = true;
final parentGame = c.findParent<FlameGame>();
if (parentGame != null) {
c.onGameResize(parentGame.size);
}
});
_addLater.clear();
}
Expand Down

0 comments on commit eae8150

Please sign in to comment.