public static void Unregister(ECSComponent comp) { Pool reg = null; Type t = comp.GetType(); if (pools_dict.TryGetValue(t, out reg)) { reg.Unregister(comp); } }
/// <summary> /// Register component in corresponding pool /// </summary> /// <param name="icomp"></param> public static void Register(ECSComponent comp) { Pool reg = null; Type t = comp.GetType(); if (pools_dict.TryGetValue(t, out reg)) { reg.Register(comp); } else { reg = CreatePool(t); reg.Register(comp); } }