using UnityEngine;
namespace BaseGames.Core
{
///
/// 全局对象池服务接口。
/// 通过 ServiceLocator 访问,解耦调用方与 GlobalObjectPool 具体实现。
///
public interface IObjectPoolService
{
/// 从池中取出指定 Component 类型的对象,并激活到指定位置/朝向。
T Spawn(string key, Vector3 position, Quaternion rotation) where T : Component;
/// 从池中取出 GameObject,并激活到指定位置/朝向。
GameObject Spawn(string key, Vector3 position, Quaternion rotation);
/// 将对象归还到池中(停用并入队)。
void Despawn(string key, Pool.PooledObject po);
/// 清空指定 key 的对象池(场景卸载时调用)。
void ClearPool(string key);
}
}