public void ShowPop(PopBase pop, PopShow option = PopShow.REPLACE_CURRENT) { if (current != null) { if (option == PopShow.DONT_SHOW_IF_OTHERS_SHOWING) { Destroy(pop.gameObject); } else if (option == PopShow.REPLACE_CURRENT) { current.Close(); } else if (option == PopShow.STACK) { current.Hide(); } } current = pop; if (option != PopShow.SHOW_PREVIOUS) { current.onDialogClosed += OnOneDialogClosed; current.onDialogOpened += OnOneDialogOpened; pops.Push(current); } current.ShowPop(); if (onPopOpened != null) { onPopOpened(); } }