private GameObject Spawn(System.Action <PooledObjectInstance> spawnAction, EFetchType type) { PooledObjectInstance obj = Fetch(type); if (obj == null) { return(null); } spawnAction(obj); return(obj.Instance); }
public PooledObjectInstance Fetch(EFetchType type = EFetchType.LOOP) { return(mFetchTypeFunc[(int)type]()); }
public GameObject Spawn(Vector3 position, EFetchType fetchType) { return(Spawn(inst => inst.Spawn(position), fetchType)); }