Beispiel #1
0
        public GameObject FetchAvailable()
        {
            var entry    = _available.Dequeue();
            var poolable = entry.GetComponent <IPoolable>();

            poolable.Aquire();
            onPoolableAquire?.Invoke(_id, _entries.Length, InUseTotal);

            return(entry);
        }
Beispiel #2
0
 private void HandlePoolableRelease(GameObject go)
 {
     _available.Enqueue(go);
     onPoolableRelease?.Invoke(_id, _entries.Length, InUseTotal);
 }