com.alicizax.unity.framework/Runtime/ABase/ObjectPool/IObjectPool.cs
陈思海 e42be670fe 彻底重构ObjectPoolService模块
重构ObjectPoolService模块
去掉过度设计移除旧的容器列表
使用自定义Hash提高整体性能速度
单线程高吞吐
2026-04-22 13:04:31 +08:00

29 lines
755 B
C#

using System;
namespace AlicizaX.ObjectPool
{
public interface IObjectPool<T> where T : ObjectBase
{
string Name { get; }
string FullName { get; }
Type ObjectType { get; }
int Count { get; }
bool AllowMultiSpawn { get; }
float AutoReleaseInterval { get; set; }
int Capacity { get; set; }
float ExpireTime { get; set; }
int Priority { get; set; }
void Register(T obj, bool spawned);
bool CanSpawn();
bool CanSpawn(string name);
T Spawn();
T Spawn(string name);
void Unspawn(T obj);
void Unspawn(object target);
void Release();
void Release(int toReleaseCount);
void ReleaseAllUnused();
}
}