public void Close(eKindWindow wnd) { if (_dicUIs.ContainsKey(wnd)) { _dicUIs[wnd].SetActive(false); } }
public void DeleteKey(eKindWindow wnd) { if (_dicUIs.ContainsKey(wnd)) { _dicUIs.Remove(wnd); } }
public T GetWnd <T>(eKindWindow wnd) where T : Component { if (_dicUIs.ContainsKey(wnd)) { return(_dicUIs[wnd].GetComponent <T>()); } return(null); }
public bool isOpened(eKindWindow wnd) { if (_dicUIs.ContainsKey(wnd)) { return(_dicUIs[wnd].activeSelf); } return(false); }
public T OpenWnd <T>(eKindWindow wnd) where T : Component { if (!_dicUIs.ContainsKey(wnd)) { GameObject ui = Instantiate(ResourcePoolManager._instance.GetObj <GameObject>(ResourcePoolManager.eResourceKind.Prefab, wnd.ToString()), transform); _dicUIs.Add(wnd, ui); return(ui.GetComponent <T>()); } else { if (!_dicUIs[wnd].activeSelf) { _dicUIs[wnd].SetActive(true); } return(GetWnd <T>(wnd)); } }