标签:
using UnityEngine;
using System.Collections;
public class TSingleton<T> where T: new () {
private static T Singleton;
public static T GetInstance() {
if(Singleton == null){
Singleton = new T();
}
return Singleton;
}
}
标签:
原文地址:http://www.cnblogs.com/ZeroMurder/p/5236935.html