public static Pandora GetInstance() { if (object.ReferenceEquals(instance, null)) { GameObject obj2 = new GameObject("Pandora"); if (GetPandoraParent() != null) { obj2.transform.parent = GetPandoraParent().transform; } instance = obj2.AddComponent <Pandora>(); } return(instance); }
private void OnApplicationQuit() { stopConnectAll = true; try { NetProxcy.CloseSocket(); } catch (Exception exception) { com.tencent.pandora.Logger.d(exception.Message); } com.tencent.pandora.Logger.d("Pandora OnApplicationQuit"); instance = null; pandora_gm = null; }
public static NotificationCenter DefaultCenter() { if (Pandora.stopConnectAll) { return(null); } if (null == defaultCenter) { GameObject obj2 = new GameObject("TPlay Notification Center"); if (Pandora.GetInstance().gameObject != null) { obj2.transform.parent = Pandora.GetInstance().gameObject.transform; } defaultCenter = obj2.AddComponent <NotificationCenter>(); } return(defaultCenter); }