Ejemplo n.º 1
0
            private GameObject Spawn(System.Action <PooledObjectInstance> spawnAction, EFetchType type)
            {
                PooledObjectInstance obj = Fetch(type);

                if (obj == null)
                {
                    return(null);
                }

                spawnAction(obj);
                return(obj.Instance);
            }
Ejemplo n.º 2
0
 public PooledObjectInstance Fetch(EFetchType type = EFetchType.LOOP)
 {
     return(mFetchTypeFunc[(int)type]());
 }
Ejemplo n.º 3
0
 public GameObject Spawn(Vector3 position, EFetchType fetchType)
 {
     return(Spawn(inst => inst.Spawn(position), fetchType));
 }