void ClickLabelBack(GameObject go) { if (GameCenter.mainPlayerMng.MainPlayerInfo.CurSceneType != SceneType.SCUFFLEFIELD) { GameCenter.messageMng.AddClientMsg(405); return; } string url = labText.GetUrlAtPosition(UICamera.lastWorldPosition); if (!string.IsNullOrEmpty(url)) { string[] urlStr = url.Split('|'); if (urlStr.Length == 3) { switch (urlStr[0]) { case "0": break; case "1": //跳到一级界面 GUIType uiType = (GUIType)Enum.Parse(Type.GetType("GUIType"), urlStr[2]); if (uiType == GUIType.NEWMALL && curEquipmentInfo != null) { GameCenter.buyMng.OpenBuyWnd(curEquipmentInfo); } else { GameCenter.uIMng.SwitchToUI(uiType); } ToolTipMng.CloseAllTooltip(); break; case "2": //跳到二级界面 SubGUIType subUiType = (SubGUIType)Enum.Parse(Type.GetType("SubGUIType"), urlStr[2]); GameCenter.uIMng.SwitchToSubUI(subUiType); ToolTipMng.CloseAllTooltip(); break; case "3": int npcID = 0; if (int.TryParse(urlStr[2], out npcID)) { ToolTipMng.CloseAllTooltip(); GameCenter.uIMng.SwitchToUI(GUIType.NONE); GameCenter.taskMng.PublicTraceToNpc(npcID); } break; } } else { Debug.Log("数据错误!"); } } Debug.Log("url:" + url); }
void OnDisable() { if (mSyncTriggerChk != null) { mSyncTriggerChk.value = false; mSyncTriggerChk = null; } GameCenter.inventoryMng.OnUpdateDetailItem -= GetItemDetail; ToolTipMng.CloseAllTooltip(); //同时关闭比较界面 }
/// <summary> /// 根据界面id设置一个UILabel链接至UI界面 /// </summary> void OnClickLabelBack(GameObject go) { if (GameCenter.mainPlayerMng.MainPlayerInfo.CurSceneType != SceneType.SCUFFLEFIELD) { GameCenter.messageMng.AddClientMsg(405); return; } string url = labText.GetUrlAtPosition(UICamera.lastWorldPosition); if (!string.IsNullOrEmpty(url)) { string[] urlStr = url.Split('|'); switch (urlStr[0]) { case "0": case "1": case "2": { if (urlStr.Length == 3) { int uiType = int.Parse(urlStr[2]); if (GameCenter.inventoryMng != null) { GameCenter.inventoryMng.SkipWndById(uiType); } else { Debug.Log(" inventoryMng 为null, 不能使用跳转界面功能"); } ToolTipMng.CloseAllTooltip(); } } break; case "3": int npcID = 0; if (int.TryParse(urlStr[2], out npcID)) { ToolTipMng.CloseAllTooltip(); GameCenter.uIMng.SwitchToUI(GUIType.NONE); GameCenter.taskMng.PublicTraceToNpc(npcID); } break; } } }
public void Close(GameObject _go) { ToolTipMng.CloseAllTooltip(); }