removeComponentsByType method
Implementation
@override
void removeComponentsByType(Entity entity, Iterable<Type> componentTypes) {
for (var componentType in componentTypes) {
final componentArray = _getComponentArray(componentType);
if (componentArray == null) {
throw ArgumentError('Component type not found in entity ($entity)');
}
final component = componentArray[entity];
if (component == null) {
continue;
}
onComponentWillRemove(entity, component);
componentArray.remove(entity);
}
}