Beispiel #1
0
        public U GetScript <U> (T key) where U : MonoBehaviour
        {
            Poolable item = GetItem(key);

            if (item != null)
            {
                return(item.GetComponent <U>());
            }
            return(null);
        }
Beispiel #2
0
        public virtual U DequeueScriptByKey <U> (T key) where U : MonoBehaviour
        {
            Poolable item = DequeueByKey(key);

            return(item.GetComponent <U>());
        }
        public virtual U DequeueScript <U> () where U : MonoBehaviour
        {
            Poolable item = Dequeue();

            return(item.GetComponent <U>());
        }