public void DestroyMe() { this.mIsDestroying = true; if (GUIChatVoiceTipPanel.mInstance != null) { UnityEngine.Object.Destroy(GUIChatVoiceTipPanel.mInstance.gameObject); GUIChatVoiceTipPanel.mInstance = null; } }
private static void CreateInstance() { if (GUIChatVoiceTipPanel.mInstance != null) { return; } GameObject gameObject = Res.LoadGUI("GUI/chatVoiceTipPanel"); if (gameObject == null) { global::Debug.LogError(new object[] { "Res.Load GUI/chatVoiceTipPanel error" }); return; } GameObject gameObject2 = NGUITools.AddChild(GameUIManager.mInstance.uiCamera.gameObject, gameObject); if (gameObject2 == null) { global::Debug.LogError(new object[] { "AddChild GUIPetTypeInfoPopUp error" }); return; } gameObject2.transform.localPosition = new Vector3(0f, 0f, 1000f); GUIChatVoiceTipPanel.mInstance = gameObject2.AddComponent<GUIChatVoiceTipPanel>(); }