addChild method
Implementation
void addChild(ActorComponent component) {
if (component.parent != null) {
component.parent!.removeChild(component);
}
component.parent = this;
_children ??= <ActorComponent>[];
_children!.add(component);
}