chicken_dy/Assets/TKGSDK/Common/SDKTools/NormalSingleton.cs

18 lines
341 B
C#

using System;
public abstract class NormalSingleton<T> where T : NormalSingleton<T>, new()
{
private static T mInstance = null;
public static T Instance
{
get
{
if (mInstance == null)
{
mInstance = new T();
}
return mInstance;
}
}
}