コード例 #1
0
    // Token: 0x060013E3 RID: 5091 RVA: 0x00072D48 File Offset: 0x00070F48
    public IEnumerator StartUpdateInventoryAndEquipNewItem(IUnityItem item, bool equipNow = false)
    {
        if (item != null)
        {
            IPopupDialog popupDialog = PopupSystem.ShowMessage(LocalizedStrings.UpdatingInventory, LocalizedStrings.WereUpdatingYourInventoryPleaseWait, PopupSystem.AlertType.None);
            yield return(UnityRuntime.StartRoutine(Singleton <ItemManager> .Instance.StartGetInventory(false)));

            PopupSystem.HideMessage(popupDialog);
            if (equipNow)
            {
                this.EquipItem(item);
            }
            else if (GameState.Current.HasJoinedGame && GameState.Current.IsInGame)
            {
                this.EquipItem(item);
            }
            else if (item.View.ItemProperties.ContainsKey(ItemPropertyType.PointsBoost) || item.View.ItemProperties.ContainsKey(ItemPropertyType.XpBoost))
            {
                InventoryItem invItem = this.GetItem(item.View.ID);
                PopupSystem.ShowItem(item, "\nYou just bought the boost item!\nThis item is activated and expires in " + invItem.DaysRemaining + " days");
            }
            else
            {
                PopupSystem.ShowItem(item, string.Empty);
            }
            yield return(UnityRuntime.StartRoutine(Singleton <PlayerDataManager> .Instance.StartGetMember()));
        }
        yield break;
    }
コード例 #2
0
    // Token: 0x06000946 RID: 2374 RVA: 0x0003AC2C File Offset: 0x00038E2C
    private IEnumerator ShowPopup(IPopupDialog popup, int delay)
    {
        yield return(new WaitForSeconds((float)delay));

        PopupSystem.Show(popup);
        yield break;
    }
コード例 #3
0
    // Token: 0x06000DDE RID: 3550 RVA: 0x0000A209 File Offset: 0x00008409
    public static void HideMessage(IPopupDialog dialog)
    {
        if (dialog != null)
        {
            AutoMonoBehaviour <PopupSystem> .Instance._popups.Remove(dialog);

            dialog.OnHide();
        }
    }
コード例 #4
0
 // Token: 0x06000DCE RID: 3534 RVA: 0x0005FC1C File Offset: 0x0005DE1C
 private void OnGUI()
 {
     this.ReleaseOldLock();
     if (this._popups.Count > 0)
     {
         IPopupDialog popupDialog = this._popups.Peek();
         this._lastLockDepth = popupDialog.Depth;
         GUI.depth           = (int)this._lastLockDepth;
         popupDialog.OnGUI();
         if (Event.current.type == EventType.Layout)
         {
             GuiLockController.EnableLock(this._lastLockDepth);
         }
     }
     GuiManager.DrawTooltip();
 }
コード例 #5
0
    // Token: 0x0600140D RID: 5133 RVA: 0x00073F54 File Offset: 0x00072154
    public IEnumerator StartGetInventory(bool showProgress)
    {
        if (this._shopItemsById.Count == 0)
        {
            PopupSystem.ShowMessage("Error Getting Shop Data", "The shop is empty, perhaps there\nwas an error getting the Shop data?", PopupSystem.AlertType.OK, null);
            yield break;
        }
        List <ItemInventoryView> inventoryView = new List <ItemInventoryView>();

        if (showProgress)
        {
            IPopupDialog popupDialog = PopupSystem.ShowMessage(LocalizedStrings.UpdatingInventory, LocalizedStrings.WereUpdatingYourInventoryPleaseWait, PopupSystem.AlertType.None);
            yield return(UserWebServiceClient.GetInventory(PlayerDataManager.AuthToken, delegate(List <ItemInventoryView> view)
            {
                inventoryView = view;
            }, delegate(Exception ex)
            {
            }));

            PopupSystem.HideMessage(popupDialog);
        }
        else
        {
            yield return(UserWebServiceClient.GetInventory(PlayerDataManager.AuthToken, delegate(List <ItemInventoryView> view)
            {
                inventoryView = view;
            }, delegate(Exception ex)
            {
            }));
        }
        List <string> prefabs = new List <string>();

        inventoryView.ForEach(delegate(ItemInventoryView view)
        {
            IUnityItem unityItem;
            if (this._shopItemsById.TryGetValue(view.ItemId, out unityItem) && unityItem.View.ItemType != UberstrikeItemType.Functional)
            {
                prefabs.Add(unityItem.View.PrefabName);
            }
            prefabs.Reverse();
        });
        Singleton <InventoryManager> .Instance.UpdateInventoryItems(inventoryView);

        yield break;
    }
コード例 #6
0
    public IEnumerator StartGetMemberWallet()
    {
        if (Cmid < 1)
        {
            Debug.LogError("Player CMID is invalid! Have you called AuthenticationManager.StartAuthenticateMember?");
            ApplicationDataManager.LockApplication("The authentication process failed. Please sign in on www.uberstrike.com and restart UberStrike.");
        }
        else
        {
            IPopupDialog popupDialog = PopupSystem.ShowMessage("Updating", "Updating your points and credits balance...", PopupSystem.AlertType.None);
            yield return(UserWebServiceClient.GetMemberWallet(AuthToken, new Action <MemberWalletView>(OnGetMemberWalletEventReturn), delegate(Exception ex)
            {
            }));

            yield return(new WaitForSeconds(0.5f));

            PopupSystem.HideMessage(popupDialog);
        }
        yield break;
    }
コード例 #7
0
    // Token: 0x06000DD0 RID: 3536 RVA: 0x0000A1AE File Offset: 0x000083AE
    public static void Show(IPopupDialog popup)
    {
        AutoMonoBehaviour <PopupSystem> .Instance._popups.Push(popup);

        AutoMonoBehaviour <PopupSystem> .Instance.enabled = true;
    }
コード例 #8
0
 // Token: 0x06000DE1 RID: 3553 RVA: 0x0000A24C File Offset: 0x0000844C
 private static bool IsCurrentPopup(IPopupDialog dialog)
 {
     return(AutoMonoBehaviour <PopupSystem> .Instance._popups.Count > 0 && AutoMonoBehaviour <PopupSystem> .Instance._popups.Peek() == dialog);
 }
コード例 #9
0
 // Token: 0x06000944 RID: 2372 RVA: 0x00007CE4 File Offset: 0x00005EE4
 public void AddEventPopup(IPopupDialog popup)
 {
     this.popups.Enqueue(popup);
 }