Пример #1
0
    /// <summary>
    /// Static equivalent of GetNext.
    /// </summary>
    /// <returns>
    /// True if the add succeeded; false otherwise (no such pool, pool is wrong type, etc.)
    /// </returns>
    public static bool TryAdd(string poolName, T item)
    {
        ComponentPool <T> pool = PoolManager.Get(poolName) as ComponentPool <T>;

        if (pool != null)
        {
            pool.Add(item);
        }
        return(pool != null);
    }