public void OpenPanel(PanelBase panelBase, UIPanelID id, OpenPanelType forParentType, bool waitAni) { if (!isInitEnd) { return; } if (mUIPanelConfigDic.ContainsKey(id)) { if (mUIPanelPoolDic.ContainsKey(id)) { mUIPanelPoolDic[id].OpenPanel(panelBase, id, forParentType, waitAni); runPanelBaseList.Add(mUIPanelPoolDic[id]); } else { var data = new UILoadderData { id = id, //config = mUIPanelConfigDic[id], parentPanel = panelBase, forParentType = forParentType, waitAni = waitAni }; UIResManager.Instance.LoadAsset(mUIPanelConfigDic[id].prefabName, UILoadCallBack, data); } } else { if (GMManager.IsInEditor) { Debug.LogError("mUIPanelConfigDic 不存在 id:" + id); } } }
/// <summary> /// 显示UI 没有就创建一个 /// </summary> public void ShowUiPanel(string uiName) { openPanelType = OpenPanelType.None; if (nameUIDict.ContainsKey(uiName)) { GameObject obj = nameUIDict[uiName]; Debug.Log(uiName); obj.gameObject.SetActive(true); //iTween.ScaleFrom(obj, Vector2.zero, 0.5f); return; } ResourcesManager.Instance.Load(uiName, typeof(GameObject), this); }
/// <summary> /// 显示UI 没有就创建一个 /// </summary> public void ShowUiPanel(string uiName, OpenPanelType opType, string baseName = "Base") { openPanelType = opType; this.baseName = baseName; if (nameUIDict.ContainsKey(uiName)) { GameObject obj = nameUIDict[uiName]; obj.gameObject.SetActive(true); if (openPanelType != OpenPanelType.None) { StartCoroutine(Play(obj)); } return; } ResourcesManager.Instance.Load(uiName, typeof(GameObject), this); }
public void OpenPanel(PanelBase parent, UIPanelID id, OpenPanelType forParentType, bool waitAni) { Reset(); panelID = id; SetParentPanel(parent); if (parent == null) { ShowPanel(forParentType); return; } if (waitAni) { parent.AddQuitAniCallBack(() => ShowPanel(forParentType)); } }
private void ShowPanel(OpenPanelType forParentType) { InitPanelData(panelData); }