Ejemplo n.º 1
0
 void Awake()
 {
     _instance = this;
     if (startupPoolMode == StartupPoolMode.Awake)
     {
         CreateStartupPools();
     }
 }
Ejemplo n.º 2
0
 public static List <T> GetPooled <T>(this T prefab) where T : Component
 {
     return(SpacePool.GetPooled(prefab, null, false));
 }
Ejemplo n.º 3
0
 public static PrefabPool CreatePool <T>(this T prefab, int initialPoolSize) where T : Component
 {
     return(SpacePool.CreatePool(prefab, initialPoolSize));
 }
Ejemplo n.º 4
0
 public static void Recycle <T>(this T obj) where T : Component
 {
     SpacePool.Recycle(obj);
 }
Ejemplo n.º 5
0
 public static GameObject Spawn(this GameObject prefab, Transform parent, Vector3 position, string name = "")
 {
     return(SpacePool.FinalSpawn(prefab, parent, position, Quaternion.identity, name));
 }
Ejemplo n.º 6
0
 public static T Spawn <T>(this T prefab, string name = "") where T : Component
 {
     return(SpacePool.Spawn(prefab, null, Vector3.zero, Quaternion.identity, name));
 }
Ejemplo n.º 7
0
 public static T Spawn <T>(this T prefab, Transform parent, Vector3 position, string name = "") where T : Component
 {
     return(SpacePool.Spawn(prefab, parent, position, Quaternion.identity, name));
 }
Ejemplo n.º 8
0
 public static void DestroyAll <T>(this T prefab) where T : Component
 {
     SpacePool.DestroyAll(prefab.gameObject);
 }
Ejemplo n.º 9
0
 public static int CountSpawned(this GameObject prefab)
 {
     return(SpacePool.CountSpawned(prefab));
 }
Ejemplo n.º 10
0
 public static int CountSpawned <T>(this T prefab) where T : Component
 {
     return(SpacePool.CountSpawned(prefab));
 }
Ejemplo n.º 11
0
 public static void RecycleAll(this GameObject prefab)
 {
     SpacePool.RecycleAll(prefab);
 }
Ejemplo n.º 12
0
 public static void RecycleAll <T>(this T prefab) where T : Component
 {
     SpacePool.RecycleAll(prefab);
 }
Ejemplo n.º 13
0
 public static void Recycle(this GameObject obj, string name)
 {
     SpacePool.Recycle(name);
 }
Ejemplo n.º 14
0
 public static void Recycle(this GameObject obj)
 {
     SpacePool.Recycle(obj);
 }
Ejemplo n.º 15
0
 public static PrefabPool CreatePool(this GameObject prefab, int initialPoolSize)
 {
     return(SpacePool.CreatePool(prefab, initialPoolSize));
 }
Ejemplo n.º 16
0
 public static void DestroyAll(this GameObject prefab)
 {
     SpacePool.DestroyAll(prefab);
 }
Ejemplo n.º 17
0
 public static List <GameObject> GetSpawned(this GameObject prefab, List <GameObject> list)
 {
     return(SpacePool.GetSpawned(prefab, list, false));
 }
Ejemplo n.º 18
0
 public static T Spawn <T>(this T prefab, Vector3 position, Quaternion rotation, string name = "") where T : Component
 {
     return(SpacePool.Spawn(prefab, null, position, rotation, name));
 }
Ejemplo n.º 19
0
 public static PrefabPool CreatePool(this GameObject prefab)
 {
     return(SpacePool.CreatePool(prefab, 0));
 }
Ejemplo n.º 20
0
 public static PrefabPool CreatePool <T>(this T prefab) where T : Component
 {
     return(SpacePool.CreatePool(prefab, 0));
 }
Ejemplo n.º 21
0
 public static List <T> GetSpawned <T>(this T prefab, List <T> list) where T : Component
 {
     return(SpacePool.GetSpawned(prefab, list, false));
 }
Ejemplo n.º 22
0
 public static GameObject Spawn(this GameObject prefab, Vector3 position, Quaternion rotation, string name = "")
 {
     return(SpacePool.FinalSpawn(prefab, null, position, rotation, name));
 }
Ejemplo n.º 23
0
 public static List <GameObject> GetPooled(this GameObject prefab, List <GameObject> list, bool appendList)
 {
     return(SpacePool.GetPooled(prefab, list, appendList));
 }
Ejemplo n.º 24
0
 public static GameObject Spawn(this GameObject prefab, string name = "")
 {
     return(SpacePool.FinalSpawn(prefab, null, Vector3.zero, Quaternion.identity, name));
 }
Ejemplo n.º 25
0
 public static List <GameObject> GetPooled(this GameObject prefab)
 {
     return(SpacePool.GetPooled(prefab, null, false));
 }
Ejemplo n.º 26
0
 public static void Recycle(this PrefabPool pool, string name)
 {
     SpacePool.Recycle(pool, name);
 }
Ejemplo n.º 27
0
 public static List <T> GetPooled <T>(this T prefab, List <T> list, bool appendList) where T : Component
 {
     return(SpacePool.GetPooled(prefab, list, appendList));
 }