static public void ComponentRegister(this PsuedoComponent thisComponent) { // get else add to type dictionary if (!Components.componentType_to_Components.TryGetValue(thisComponent.GetType(), out ISet <PsuedoComponent> componentsAdd)) { componentsAdd = new HashSet <PsuedoComponent>(); Components.componentType_to_Components.Add(thisComponent.GetType(), componentsAdd); } componentsAdd.Add(thisComponent); }
static public void ComponentDeregister(this PsuedoComponent thisComponent) => Components.componentType_to_Components[thisComponent.GetType()].Remove(thisComponent);