public void OpenPopUp(AbsPopUp popup) { if (popUps.Count == 0) { popup.OpenPopUp(this); popUps.Push(popup); } else { if (popUps.Peek().gameObject.Equals(popup.gameObject)) { return; } popUps.Peek().ClosePopUP(); popup.OpenPopUp(this); popUps.Push(popup); } }
public void OpenCurrentPopUp() { if (popUps.Count == 0) { return; } AbsPopUp openPopUp = popUps.Peek(); openPopUp.OpenPopUp(this); }