//1.C#中 泛型的知识
//2.设计模式中 单例模式的知识
public class BaseManager<T> where T:new()
{
private static T instance;
public static T GetInstance()
{
if (instance == null)
instance = new T();
return instance;
}
}
unity3d中的单例模式1--不继承MonoBehaviour
最新推荐文章于 2023-01-09 01:36:19 发布