deregisterSystem method
Deregister a previously registered system.
If the given system type is not found, it will simply return.
Implementation
void deregisterSystem(Type systemType) {
if (!_systemsByType.containsKey(systemType)) {
return;
}
final system = _systemsByType.remove(systemType);
system?.dispose();
_systems.remove(system);
_systems.sort((a, b) => a.priority - b.priority);
}