示例#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();
 }
示例#2
0
 public static void Recycle <TComponent>(HashSet <TComponent> list) where TComponent : class, IComponentBase
 {
     foreach (var item in list)
     {
         PoolRegistries.Recycle(item);
     }
     list.Clear();
 }
示例#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);
 }
示例#4
0
 public static void Recycle <T>(ref T system) where T : class, IComponentBase
 {
     PoolRegistries.Recycle(system);
     system = null;
 }