/// <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); }
public virtual void OnDropGameServerConnection(Exception ex) { if (ex != null) { PopupHandler.Add(PopupAlertMessageBuilder.GameServerDisconnection()); } }
public override void OnTryClosingGame() { if (isLeaveGamePopupRendered) { return; } PopupAlertMessage popup = (PopupAlertMessage)PopupAlertMessageBuilder.BuildPopupAlertMessage(PopupAlertMessageType.LeaveGame); isLeaveGamePopupRendered = true; popup.OnClose = (sender) => { isLeaveGamePopupRendered = false; }; }