FM/Assets/Scripts/Base/ManagerBase.cs

23 lines
377 B
C#

using System;
namespace HK
{
public class ManagerBase<T> where T : new()
{
private static T _instance;
public static T Instance
{
get
{
if (_instance == null)
{
_instance = new T();
}
return _instance;
}
}
}
}