예제 #1
0
        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);
        }
예제 #2
0
 static public void ComponentDeregister(this PsuedoComponent thisComponent) =>
 Components.componentType_to_Components[thisComponent.GetType()].Remove(thisComponent);