changePriority method
Changes the priority of component
and reorders the games component list.
Returns true if changing the component's priority modified one of the components that existed directly on the game and false if it either was a child of another component, if it didn't exist at all or if it was a component added directly on the game but its priority didn't change.
Implementation
bool changePriority(
Component component,
int priority,
) {
if (component.priority == priority) {
return false;
}
component.changePriorityWithoutResorting(priority);
_changedPriorities.add(component);
return true;
}