modify
This commit is contained in:
parent
44ad68fc7f
commit
68a6a7fcfa
@ -2,95 +2,65 @@
|
||||
|
||||
namespace AlicizaX.ObjectPool
|
||||
{
|
||||
public interface IObjectPool
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 对象池接口。
|
||||
/// </summary>
|
||||
/// <typeparam name="T">对象类型。</typeparam>
|
||||
public interface IObjectPool<T> where T : ObjectBase
|
||||
public interface IObjectPool<T> : IObjectPool where T : ObjectBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取对象池名称。
|
||||
/// </summary>
|
||||
string Name
|
||||
{
|
||||
get;
|
||||
}
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取对象池完整名称。
|
||||
/// </summary>
|
||||
string FullName
|
||||
{
|
||||
get;
|
||||
}
|
||||
string FullName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取对象池对象类型。
|
||||
/// </summary>
|
||||
Type ObjectType
|
||||
{
|
||||
get;
|
||||
}
|
||||
Type ObjectType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取对象池中对象的数量。
|
||||
/// </summary>
|
||||
int Count
|
||||
{
|
||||
get;
|
||||
}
|
||||
int Count { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取对象池中能被释放的对象的数量。
|
||||
/// </summary>
|
||||
int CanReleaseCount
|
||||
{
|
||||
get;
|
||||
}
|
||||
int CanReleaseCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取是否允许对象被多次获取。
|
||||
/// </summary>
|
||||
bool AllowMultiSpawn
|
||||
{
|
||||
get;
|
||||
}
|
||||
bool AllowMultiSpawn { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置对象池自动释放可释放对象的间隔秒数。
|
||||
/// </summary>
|
||||
float AutoReleaseInterval
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
float AutoReleaseInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置对象池的容量。
|
||||
/// </summary>
|
||||
int Capacity
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
int Capacity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置对象池对象过期秒数。
|
||||
/// </summary>
|
||||
float ExpireTime
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
float ExpireTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置对象池的优先级。
|
||||
/// </summary>
|
||||
int Priority
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
int Priority { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建对象。
|
||||
|
Loading…
Reference in New Issue
Block a user