IndieGame/client/Assets/Ether/Scripts/Module/Pool/PoolExtension.cs

37 lines
889 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
/********************************************************************
: 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);
}
}
}