prepare method
Prepares the Component to be added to a parent
, and if there is an
ancestor that is a FlameGame
that game will do necessary preparations for
this component.
If there are no parents that are a Game
false will be returned and this
will run again once an ancestor or the component itself is added to a
Game
.
Implementation
@override
void prepare(Component parent) {
super.prepare(parent);
debugMode |= parent.debugMode;
isPrepared = true;
if (hasGameRef) {
onGameResize(gameRef.size);
}
}