feat:1、添加项目

This commit is contained in:
2026-06-02 10:26:44 +08:00
commit dfead2c461
7518 changed files with 748693 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
using System;
namespace BallKingdomCrush
{
public class Singleton<T> : ISingleton, IDisposable where T : Singleton<T>, new()
{
private static T mInstance;
private static readonly object LockObject = new();
public static T Instance
{
get
{
lock (LockObject)
{
mInstance ??= new T();
mInstance.OnSingletonInit();
}
return mInstance;
}
}
public virtual void Dispose()
{
mInstance = null;
}
public void OnSingletonInit()
{
}
}
}