Ejemplo n.º 1
0
        /// <summary>
        /// Releases the effect as an allocation
        /// </summary>
        public override void Release()
        {
            // We clear this prefab because this isn't the prefab for the effect,
            // but the prefab of the GameObject the effect is creating
            _Prefab = null;

            SpawnGameObject.Release(this);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns an element back to the pool.
        /// </summary>
        /// <param name="rEdge"></param>
        public static void Release(SpawnGameObject rInstance)
        {
            if (rInstance == null)
            {
                return;
            }

            rInstance.Clear();
            sPool.Release(rInstance);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Pulls an object from the pool.
        /// </summary>
        /// <returns></returns>
        public static SpawnGameObject Allocate()
        {
            SpawnGameObject lInstance = sPool.Allocate();

            return(lInstance);
        }