优化
This commit is contained in:
@@ -34,4 +34,10 @@ public class GameObjectPool : MonoBehaviour
|
||||
go.transform.SetParent(transform, false);
|
||||
_pool.Push(go);
|
||||
}
|
||||
|
||||
public void AllRelease()
|
||||
{
|
||||
foreach (var go in _pool) Destroy(go);
|
||||
_pool.Clear();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user