lishuo 8f0598580d 骑行页面消息通知
在线用户和影子选手用图片显示,缩放等功能按钮微调
2021-05-11 18:21:32 +08:00

29 lines
627 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Assets.Scenes.Ride.Scripts
{
public abstract class Singleton<T> where T : class, new()
{
private static T instance = null;
private static readonly object locker = new object();
public static T Instance
{
get
{
lock (locker)
{
if (instance == null)
instance = new T();
return instance;
}
}
}
}
}