using System.Collections.Generic; namespace Gameplay.Pool { public class ObjPool { private readonly Stack _pool = new Stack(); public int count => _pool.Count; public object Get() { if (_pool.Count > 0) { return _pool.Pop(); } return null; } public void Return(object obj) { _pool.Push(obj); } } }