增加A2WToolBox工具集,增加Launch场景核LaunchPanel
This commit is contained in:
32
Assets/A2WToolBox/Runtime/PoolManager/ObjectPoolContainer.cs
Normal file
32
Assets/A2WToolBox/Runtime/PoolManager/ObjectPoolContainer.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
namespace MonsterLove.Collections
|
||||
{
|
||||
public class ObjectPoolContainer<T>
|
||||
{
|
||||
private T item;
|
||||
|
||||
public bool Used { get; private set; }
|
||||
|
||||
public void Consume()
|
||||
{
|
||||
Used = true;
|
||||
}
|
||||
|
||||
public T Item
|
||||
{
|
||||
get
|
||||
{
|
||||
return item;
|
||||
}
|
||||
set
|
||||
{
|
||||
item = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Release()
|
||||
{
|
||||
Used = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user