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