Method TryGet
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
TryGet<T>(IPool<T>, out T)
Gets an item from the pool if one is available.
public static bool TryGet<T>(this IPool<T> pool, out T obj)
Parameters
pool
IPool<T>The pool to get an object from.
obj
TThe object that was acquired, or the default value of T if no object was available.
Returns
Type Parameters
T
The type of the objects in the pool.