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;
}
}
时间: 2024-12-27 22:19:39