Esempio n. 1
0
 // 饿汉模式
 public void HungryInit()
 {
     if (mInstance == null)
     {
         mInstance = SingletonCreator.CreateSingleton <T>();
     }
 }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     _singletonDemo1 = SingletonCreator.CreateSingleton <SingletonDemo1>();
 }
Esempio n. 3
0
 public static void Initialize()
 {
     mInstance = SingletonCreator.CreateSingleton <T>();
 }