Ejemplo n.º 1
0
 public static void Recycle <TComponent>(List <TComponent> list) where TComponent : class, IComponentBase
 {
     for (int i = 0; i < list.Count; ++i)
     {
         PoolRegistries.Recycle(list[i], list[i].GetType());
     }
     list.Clear();
 }
Ejemplo n.º 2
0
 public static void Recycle <TComponent>(HashSet <TComponent> list) where TComponent : class, IComponentBase
 {
     foreach (var item in list)
     {
         PoolRegistries.Recycle(item);
     }
     list.Clear();
 }
Ejemplo n.º 3
0
 public static void Recycle <TComponent>(ref TComponent[] list) where TComponent : class, IComponentBase
 {
     for (int i = 0; i < list.Length; ++i)
     {
         PoolRegistries.Recycle(list[i]);
     }
     PoolArray <TComponent> .Recycle(ref list);
 }
Ejemplo n.º 4
0
 public static void Recycle <T>(ref T system) where T : class, IComponentBase
 {
     PoolRegistries.Recycle(system);
     system = null;
 }