IndieGame/client/Assets/Ether/Scripts/Module/Pool/PoolExtension.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

37 lines
889 B
C#

/********************************************************************
文件: PoolExtension.cs
作者: 梦语
邮箱: 1982614048@qq.com
创建时间: 2024/03/29 17:28:19
最后修改: 梦语
最后修改时间: 2024/04/12 17:17:30
功能: 对象池扩展
*********************************************************************/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ether
{
public static class PoolExtension
{
/// <summary>
/// 放入对象池回收
/// </summary>
/// <param name="obj"></param>
public static void PushPool(this object obj)
{
PoolManager.Inst.Push(obj);
}
/// <summary>
/// 放入对象池回收
/// </summary>
/// <param name="obj"></param>
public static void PushPool(this GameObject obj, string name = "")
{
PoolManager.Inst.Push(obj, name);
}
}
}