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