更新Demo

更新Demo
This commit is contained in:
ALEXTANG
2023-12-20 12:08:25 +08:00
parent 5cf6b8c034
commit f64bb37706
2996 changed files with 29677 additions and 173915 deletions

View File

@@ -0,0 +1,27 @@
using TEngine;
namespace GameBase
{
/// <summary>
/// 通用单例。
/// </summary>
/// <typeparam name="T">泛型T。</typeparam>
public class Singleton<T> where T : new()
{
private static T _instance;
public static T Instance
{
get
{
if (null == _instance)
{
_instance = new T();
Log.Assert(_instance != null);
}
return _instance;
}
}
}
}