/// <summary> Shows the referenced UIPopup with its preset settings </summary>
 public UIPopup Show()
 {
     if (Popup == null)
     {
         return(null);
     }
     Popup.Show(InstantAction);
     return(Popup);
 }
Ejemplo n.º 2
0
        /// <summary> Shows the given popup with the given settings </summary>
        /// <param name="popup"> Target popup that needs to be shown </param>
        /// <param name="addToPopupQueue"> If the popup is added to the PopupQueue, it will be shown when its turn comes up. Until then it will remain hidden. </param>
        /// <param name="instantAction"> When shown, should the popup animate instantly? (in zero seconds) </param>
        public static void ShowPopup(UIPopup popup, bool addToPopupQueue, bool instantAction)
        {
            if (popup == null)
            {
                return;
            }
            if (addToPopupQueue)
            {
                AddToQueue(popup, instantAction);
                return;
            }

            if (Instance.DebugComponent)
            {
                DDebug.Log("Showing UIPopup '" + popup.PopupName + "'", Instance);
            }
            popup.Show(instantAction);
        }