Esempio n. 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 2
0
 private void Awake()
 {
     // instance = this;
     if (instance == null)
     {
         DontDestroyOnLoad(gameObject);
         instance = this;
     }
     else if (instance != null)
     {
         Destroy(gameObject);
     }
     msgids = new ushort[]
     {
         (ushort )UIEvent.HideLauncher,
         (ushort )UIEvent.ShowLauncher
     };
     RegistSelf(this, msgids);
 }