public static void OpenDialog(Define.DialogType dialogType, System.Action callback = null) { if (instance.dialogDic.ContainsKey(dialogType)) { if (nowOpenDialog != Define.DialogType.None) { instance.JustCloseDialog(nowOpenDialog, () => { instance.JustOpenDialog(dialogType, () => { if (callback != null) { callback(); } openDialogStack.Push(dialogType); nowOpenDialog = dialogType; }); }); } else { instance.JustOpenDialog(dialogType, () => { if (callback != null) { callback(); } openDialogStack.Push(dialogType); nowOpenDialog = dialogType; }); } } }