示例#1
0
        /// <summary>
        /// Created a popup informing the player about the status of the previously
        /// requested purchase. If the parameter is null, the purchase has failed.
        /// </summary>
        public void PurchaseConfirmationAsyncCallback(AvatarMetadata avatarMetadata)
        {
            PopupAlertMessageBuilder.BuildPopupAlertMessage(
                avatarMetadata != null ?
                PopupAlertMessageType.AvatarPurchaseSuccessful :
                PopupAlertMessageType.AvatarPurchaseFailure, avatarMetadata);

            attributeMenu.RefreshCurrencyValues();

            EnableInterfaceElements();

            // If the player is still selecting the purchased avatar
            if (avatarMetadata != null && selectedAvatarMetadata.ID == avatarMetadata.ID)
            {
                buyButton.Disable(true);
                tryButton.Disable(true);
            }

            if (avatarMetadata == null)
            {
                return;
            }

            player.OwnedAvatar[avatarMetadata.AvatarCategory].Add(avatarMetadata.ID);
            UpdateFilter(searchFilter.AvatarCategory, searchFilter.CurrentPage);
        }
示例#2
0
 public virtual void OnDropGameServerConnection(Exception ex)
 {
     if (ex != null)
     {
         PopupHandler.Add(PopupAlertMessageBuilder.GameServerDisconnection());
     }
 }
示例#3
0
        public override void OnTryClosingGame()
        {
            if (isLeaveGamePopupRendered)
            {
                return;
            }

            PopupAlertMessage popup = (PopupAlertMessage)PopupAlertMessageBuilder.BuildPopupAlertMessage(PopupAlertMessageType.LeaveGame);

            isLeaveGamePopupRendered = true;

            popup.OnClose = (sender) =>
            {
                isLeaveGamePopupRendered = false;
            };
        }