using System; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; public interface IPool { /// /// 回收事件 /// event Action OnRecycle; /// /// 取出事件 /// event Action OnGet; /// /// 获取IPoolObject /// IPoolObject Get(); /// /// 回收IPoolObject /// /// void Recycle(IPoolObject _pool_object); /// /// 销毁IPoolObject /// /// void Dispose(IPoolObject _pool_object); } public interface IPoolObject { /// /// 对象池的引用 /// IPool Pool { get; set; } /// /// 内容 /// T Content { get; set; } /// /// 回收自己 /// void Recycle(); /// /// 销毁自己IPoolObject /// void Dispose(); }