public GameObject pull(string objName) { print("Getting object Name: " + objName); InnerPool inner = pools[objName]; return(inner.Pop()); }
public virtual GameObject Get() { var go = InnerPool.Get(); go.SetActive(true); return(go); }
/* * Functions */ public InnerPool RegistObject(string name, T obj) { if (obj == null) { return(null); } InnerPool pool; if (!poolDic.TryGetValue(name, out pool)) { pool = new InnerPool(obj, initNum, addNum, transform); poolDic.Add(name, pool); } return(pool); }
public void changeAllowGrowth(string objName, bool allowGrowth) { InnerPool inner = pools[objName]; inner.allowGrowth = allowGrowth; }
public void changePooledAmount(string objName, int newPooledAmount) { InnerPool inner = pools[objName]; inner.pooledAmount = newPooledAmount; }
public void push(GameObject obj) { InnerPool inner = pools[obj.name]; inner.Push(obj); }
public bool Return(GameObject o) { o.SetActive(false); return(InnerPool.Return(o)); }
/// <summary> /// prewarm the pool /// </summary> /// <param name="warmCount">Warm count.</param> public void PreWarm(int warmCount) { InnerPool.PreWarm(warmCount); }
/// <summary> /// Shutdown this instance. /// </summary> public virtual void Shutdown() { InnerPool.Shutdown(); }
public void Clear() => InnerPool.Clear();
public HttpClient Get(IRequestBuilder builder) { GetCount++; return(InnerPool.Get(builder)); }