/// <summary> ///关闭除HUD外的所有窗口 /// </summary> public void CloseAllWndExceptHUD(string name) { foreach (UIWndData data in DBManager.m_DBUIWnd.GetUIWndData().Values) { UIBaseWnd wnd = UIBaseWnd.GetWndByName(data.WndName); if (wnd != null && !string.Equals(data.WndName, "HUD") && !string.Equals(data.WndName, name) && wnd.IsOpen()) { wnd.CloseWnd(); } } }
public void SwitchWnd(string strWndName) { UIBaseWnd wnd = UIBaseWnd.GetWndByName(strWndName); if (wnd == null) { Debuger.LogError("Open Window " + strWndName + "fail!"); return; } wnd.SwitchWnd(); }
public UIBaseWnd GetWnd(string strWndName) { UIBaseWnd wnd = UIBaseWnd.GetWndByName(strWndName); if (wnd == null) { Debuger.LogError("Get Window " + strWndName + "fail!"); return(null); } return(wnd); }
public void CloseWnd(string strWndName) { UIBaseWnd wnd = UIBaseWnd.GetWndByName(strWndName); if (wnd == null) { Debuger.LogError("Close Window " + strWndName + "fail!"); return; } //Debuger.Log("CloseWnd " + strWndName); wnd.CloseWnd(); }
public void OpenWnd(string strWndName) { UIBaseWnd wnd = UIBaseWnd.GetWndByName(strWndName); if (wnd == null) { Debuger.LogError("Open Window " + strWndName + "fail!"); return; } //if (GameApp.GetGuideManager() != null) // GameApp.GetGuideManager().OpenWindow(strWndName); wnd.OpenWnd(); }
public void CloseAllWnd() { foreach (UIWndData data in DBManager.m_DBUIWnd.GetUIWndData().Values) { UIBaseWnd wnd = UIBaseWnd.GetWndByName(data.WndName); if (wnd == null) { Debuger.LogWarning("CloseAllWnd is error=" + data.WndName); } else if (wnd.IsOpen()) { wnd.CloseWnd(); } } }
public bool OnlyHudOpen() { UIBaseWnd wnd = UIBaseWnd.GetWndByName("HUD"); if (!wnd.IsOpen()) { return(false); } foreach (UIBaseWnd data in UIBaseWnd.DicWnd.Values) { if (data.m_strWndName != "HUD") { if (data.IsOpen()) { return(false); } } } return(true); }
public void InitDBUIWnd() { Debuger.Log("DBManager.GetDBUIWnd().GetUIWndData().Count" + DBManager.m_DBUIWnd.GetUIWndData().Count); foreach (UIWndData data in DBManager.m_DBUIWnd.GetUIWndData().Values) { // Debuger.Log("DBManager.m_DBUIWnd.GetUIWndData().Count====" + DBManager.m_DBUIWnd.GetUIWndData().Count); //Debuger.Log("data.WndName====" + data.WndName); UIBaseWnd baseWnd = Assembly.GetExecutingAssembly().CreateInstance("ClashGame." + data.WndName) as UIBaseWnd; if (baseWnd != null) { // 后面的覆盖前面的 if (UIBaseWnd.DicWnd.ContainsKey(data.WndName)) { UIBaseWnd.DicWnd.Remove(data.WndName); } baseWnd.Init(data); UIBaseWnd.DicWnd.Add(data.WndName, baseWnd); } } }