You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
461 B
C#

namespace Script.FrameWork
{
public class Singleton<T> where T : new()
{
private static T _instance;
public static T Instance
{
get
{
if (_instance == null)
_instance = new T();
return _instance;
}
}
public virtual void Init()
{
}
public virtual void UnInit()
{
}
}
}