/// <summary>
    /// リロード
    /// </summary>
    private void Reload()
    {
        //BOX内リスト確認通信
        PresentApi.CallListApi((response) =>
        {
            //追加ローダー準備
            var addLoader = new AssetListLoader(response.tPresentBox
                                                .Concat(response.tPresentBoxLimited)
                                                .Concat(response.tPresentBoxReceived)
                                                .Select(x => CommonIconUtility.GetItemInfo(x.itemType, x.itemId))
                                                .Where(x1 => !x1.IsCommonSprite() && !this.loader.Exists(x2 => x2.path == x1.GetSpritePath()))
                                                .Select(x => new AssetLoader <Sprite>(x.GetSpritePath())));

            //ロード中はタッチブロック
            SharedUI.Instance.DisableTouch();

            //ロード
            addLoader.Load(() =>
            {
                //タッチブロック解除
                SharedUI.Instance.EnableTouch();
                //ローダー統合
                this.loader.AddRange(addLoader);
                //再セットアップ
                this.Setup(response, this.loader);
                //必要ならVIPレベルアップ表示
                UIVipLevelUp.OpenIfNeed(this.vipLevelUpPrefab);
            });
        });
    }
Esempio n. 2
0
    /// <summary>
    /// ポップアップ判断
    /// </summary>
    public static void OpenIfNeed(UIVipLevelUp prefab)
    {
        if (beforeVipLevel != UserData.Get().vipLevel)
        {
            beforeVipLevel = UserData.Get().vipLevel;

            var popup = SharedUI.Instance.ShowPopup(prefab);
            popup.Set(UserData.Get().vipLevel);
        }
    }