register<T extends Component> method
Implementation
ComponentId register<T extends Component>(T Function(int index) creator, [int? capacity]) {
assert(!registerTypes.contains(T), 'Registering component type more than once.');
var index = _nextIndex;
componentArrays.add(ComponentArray<T>(capacity ?? defaultCapacity, creator));
registerTypes.add(T);
_nextIndex++;
return index;
}