public static bool HideCommonDialog(CommonDialog cd) { if (GUIManager.blockBGCollider) { GUIBase guibase = GUIManager.guiBases["CommonDialogBarrier"]; Vector3 localPosition = guibase.gameObject.transform.localPosition; int i = 0; if (GUIManager.closeAllMode) { for (i = 0; i < GUIManager.cdList_BK.Count; i++) { if (cd == GUIManager.cdList_BK[i]) { GUIManager.closeAll_CT--; break; } } if (GUIManager.closeAll_CT <= 0) { GUIManager.closeAll_CT = 0; GUIManager.closeAllMode = false; GUIManager.HideGUI("CommonDialogBarrier"); GUIManager.ResetTouchingCount(); if (Singleton <GUIManager> .Instance.ActCallBackCloseAllCMD != null) { Singleton <GUIManager> .Instance.ActCallBackCloseAllCMD(); } GUIManager.barrierReqToFade = true; if (GUIManager.actCallBackCloseAll != null) { cd.SetLastCallBack(GUIManager.actCallBackCloseAll); } if (GUIManager.actCallShowDialog != null) { GUIManager.actCallShowDialog(null); } } } if (!GUIManager.closeAllMode || i == GUIManager.cdList_BK.Count) { if (GUIManager.commonDialogs.Count == 1) { GUIManager.HideGUI("CommonDialogBarrier"); GUIManager.ResetTouchingCount(); if (Singleton <GUIManager> .Instance.ActCallBackCloseAllCMD != null) { Singleton <GUIManager> .Instance.ActCallBackCloseAllCMD(); } GUIManager.barrierReqToFade = true; if (GUIManager.actCallShowDialog != null) { GUIManager.actCallShowDialog(null); } } else { CommonDialog topDialog = GUIManager.GetTopDialog(cd, true); localPosition.z = topDialog.gameObject.transform.localPosition.z + GUIManager.DLG_BARRIER_OFS_Z; guibase.gameObject.transform.localPosition = localPosition; if (GUIMain.USE_NGUI) { UIWidget component = guibase.gameObject.GetComponent <UIWidget>(); if (component != null) { component.depth = (int)(-(int)guibase.gameObject.transform.localPosition.z); } } UISprite component2 = guibase.gameObject.GetComponent <UISprite>(); if (component2 != null) { component2.color = topDialog.barrierColor; } if (GUIManager.actCallShowDialog != null) { GUIManager.actCallShowDialog(topDialog); } } } } return(true); }