public void CloseUI() { UIData uiData = transform.parent.GetComponent <UIData>(); if (uiData.GetOnClickPop()) { UIController.Instance.Pop(transform.parent.GetComponent <UIData>().uiName); } }
public bool PopTop() { int num = uiNameList.Count; if (num > 0) { string name = uiNameList[uiNameList.Count - 1]; GameObject ui = getLayer(name); if (ui != null) { UIData data = ui.GetComponent <UIData>(); if (data.GetFreePop() && data.GetOnClickPop()) { Pop(name); return(true); } } } return(false); }