Esempio n. 1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 2
0
 public static LuaTimerManager initForGameObject(GameObject dontDestroyOnLoadGameObject)
 {
     if (instance == null)
     {
         instance = dontDestroyOnLoadGameObject.AddComponent <LuaTimerManager>();
     }
     return(instance);
 }
Esempio n. 3
0
 public static LuaTimerManager getInstance()
 {
     if (instance == null)
     {
         GameObject gameObject = new GameObject("LuaTimerManager");
         DontDestroyOnLoad(gameObject);
         instance = gameObject.AddComponent <LuaTimerManager>();
     }
     return(instance);
 }