Ejemplo n.º 1
0
 public static T Spawn <T>(this IPrefabPoolService service, T prefabComponent) where T : Component
 {
     return(service.Spawn(prefabComponent.gameObject, null, Vector3.zero, Quaternion.identity).GetComponent <T>());
 }
Ejemplo n.º 2
0
 public static void Recycle <T>(this IPrefabPoolService service, T targetComponent) where T : Component
 {
     service.Recycle(targetComponent.gameObject);
 }
Ejemplo n.º 3
0
 public static T Spawn <T>(this IPrefabPoolService service, T prefabComponent, Vector3 position, Quaternion rotation) where T : Component
 {
     return(service.Spawn(prefabComponent.gameObject, null, position, rotation).GetComponent <T>());
 }
Ejemplo n.º 4
0
 public static T Spawn <T>(this IPrefabPoolService service, T prefabComponent, Transform parent, Vector3 position) where T : Component
 {
     return(service.Spawn(prefabComponent.gameObject, parent, position, Quaternion.identity).GetComponent <T>());
 }
Ejemplo n.º 5
0
 public static GameObject Spawn(this IPrefabPoolService service, Prefab prefab)
 {
     return(service.Spawn(prefab, null, Vector3.zero, Quaternion.identity));
 }
Ejemplo n.º 6
0
 public static GameObject Spawn(this IPrefabPoolService service, Prefab prefab, Vector3 position, Quaternion rotation)
 {
     return(service.Spawn(prefab, null, position, rotation));
 }
Ejemplo n.º 7
0
 public static GameObject Spawn(this IPrefabPoolService service, Prefab prefab, Transform parent)
 {
     return(service.Spawn(prefab, parent, Vector3.zero, Quaternion.identity));
 }