using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//System.IDisposable where T : new()
//继承System.IDisposable
public class Singleton<T> : System.IDisposable where T :new()
{
private static T instance;
public static T Instance
{
get
{
if (instance == null)
{
instance = new T();
}
return instance;
}
}