20 lines
363 B
C#
20 lines
363 B
C#
|
namespace HK
|
||
|
{
|
||
|
internal class ManagerBase<T> where T : new()
|
||
|
{
|
||
|
private static T _instance;
|
||
|
|
||
|
public static T Instance
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
if (_instance == null)
|
||
|
{
|
||
|
_instance = new T();
|
||
|
}
|
||
|
|
||
|
return _instance;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|