Exemplo n.º 1
0
 public GameObject Pop(Vector3 pos = null, Quaternion rot = null)
 {
     while (this.stack.Count > 0)
     {
         Poolable poolable = this.stack.Pop();
         if (Object.op_Implicit((Object)poolable))
         {
             ((Component)poolable).get_transform().set_position(pos);
             ((Component)poolable).get_transform().set_rotation(rot);
             poolable.LeavePool();
             return(((Component)poolable).get_gameObject());
         }
     }
     return((GameObject)null);
 }
Exemplo n.º 2
0
 public GameObject Pop(Vector3 pos = null, Quaternion rot = null)
 {
     while (this.stack.Count > 0)
     {
         Poolable poolable = this.stack.Pop();
         if (!poolable)
         {
             continue;
         }
         poolable.transform.position = pos;
         poolable.transform.rotation = rot;
         poolable.LeavePool();
         return(poolable.gameObject);
     }
     return(null);
 }