private IEnumerator SetPointShopGetPointUI()
 {
     if (pointShopGetPointData != null && pointShopGetPointData.Count > 0)
     {
         LoadingQueue queue = new LoadingQueue(this);
         queue.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointIconImageName((int)pointShopGetPointData[0].pointShopId), false);
         if (queue.IsLoading())
         {
             yield return((object)queue.Wait());
         }
         SetActive((Enum)UI.OBJ_NORMAL_ROOT, true);
         SetLabelText((Enum)UI.LBL_POINT_NORMAL, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopGetPointData[0].basePoint));
         UITexture normalTex = GetCtrl(UI.TEX_NORMAL_ICON).GetComponent <UITexture>();
         ResourceLoad.LoadPointIconImageTexture(normalTex, pointShopGetPointData[0].pointShopId);
         if (pointShopGetPointData.Count >= 2)
         {
             queue.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointIconImageName((int)pointShopGetPointData[1].pointShopId), false);
             if (queue.IsLoading())
             {
                 yield return((object)queue.Wait());
             }
             SetActive((Enum)UI.OBJ_EVENT_ROOT, true);
             SetLabelText((Enum)UI.LBL_POINT_EVENT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopGetPointData[1].basePoint));
             UITexture eventTex = GetCtrl(UI.TEX_EVENT_ICON).GetComponent <UITexture>();
             ResourceLoad.LoadPointIconImageTexture(eventTex, pointShopGetPointData[1].pointShopId);
         }
     }
 }
Exemple #2
0
    private void ViewEventTab()
    {
        SetActive((Enum)UI.OBJ_NORMAL, false);
        SetActive((Enum)UI.OBJ_TAB_ROOT, true);
        SetActive((Enum)UI.OBJ_ON_TAB_NORMAL, false);
        SetActive((Enum)UI.OBJ_ON_TAB_EVENT, true);
        SetActive((Enum)UI.OBJ_EVENT_LIST, true);
        List <PointShop> current = (from x in pointShop
                                    where x.isEvent
                                    select x).ToList();

        SetGrid(UI.GRD_EVENT_LIST, "PointShopEventList", current.Count, true, delegate(int i, Transform t, bool b)
        {
            PointShop pointShop  = current[i];
            UITexture component  = FindCtrl(t, UI.TEX_EVENT_LIST_BANNER).GetComponent <UITexture>();
            UITexture component2 = FindCtrl(t, UI.TXT_EVENT_LIST_POINT_ICON).GetComponent <UITexture>();
            SetLabelText(t, UI.LBL_EVENT_LIST_POINT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShop.userPoint));
            ResourceLoad.LoadPointIconImageTexture(component2, (uint)pointShop.pointShopId);
            ResourceLoad.LoadPointShopBannerTexture(component, (uint)pointShop.pointShopId);
            SetEvent(FindCtrl(t, UI.TEX_EVENT_LIST_BANNER), "EVENT_SHOP", pointShop);
            int num = (from x in pointShop.items
                       where x.isBuyable
                       where x.type != 8 || !MonoBehaviourSingleton <UserInfoManager> .I.IsUnlockedStamp(x.itemId)
                       where x.type != 9 || !MonoBehaviourSingleton <UserInfoManager> .I.IsUnlockedDegree(x.itemId)
                       where x.type != 7 || !MonoBehaviourSingleton <GlobalSettingsManager> .I.IsUnlockedAvatar(x.itemId)
                       select x).Count();
            bool flag = num == 0;
            SetActive(t, UI.LBL_EVENT_LIST_SOLD_OUT, flag);
            SetButtonEnabled(t, UI.TEX_EVENT_LIST_BANNER, !flag);
            SetLabelText(t, UI.LBL_EVENT_LIST_REMAINING_TIME, pointShop.expire);
        });
    }
Exemple #3
0
    public override void UpdateUI()
    {
        base.UpdateUI();
        UITexture component  = GetCtrl(UI.TEX_POINT_ICON).GetComponent <UITexture>();
        UITexture component2 = GetCtrl(UI.TEX_EVENT_POP).GetComponent <UITexture>();

        ResourceLoad.LoadPointIconImageTexture(component, (uint)data.pointShopId);
        ResourceLoad.LoadPointShopBGTexture(component2, (uint)data.pointShopId);
        SetLabelText((Enum)UI.LBL_POINT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), data.userPoint));
        SetList();
    }
Exemple #4
0
    private void ViewNormalTab()
    {
        SetActive((Enum)UI.OBJ_NORMAL, true);
        SetActive((Enum)UI.OBJ_TAB_ROOT, true);
        SetActive((Enum)UI.OBJ_ON_TAB_NORMAL, true);
        SetActive((Enum)UI.OBJ_ON_TAB_EVENT, false);
        SetActive((Enum)UI.OBJ_EVENT_LIST, false);
        PointShop shop = pointShop.First((PointShop x) => !x.isEvent);

        currentPointShopItem = GetBuyableItemList();
        if (filter != null)
        {
            filter.DoFiltering(ref currentPointShopItem);
        }
        SetLabelText((Enum)UI.LBL_NORMAL_POINT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), shop.userPoint));
        UITexture component = GetCtrl(UI.TEX_NORMAL_POINT_ICON).GetComponent <UITexture>();

        ResourceLoad.LoadPointIconImageTexture(component, (uint)shop.pointShopId);
        maxPage = currentPointShopItem.Count / GameDefine.POINT_SHOP_LIST_COUNT;
        if (currentPointShopItem.Count % GameDefine.POINT_SHOP_LIST_COUNT > 0)
        {
            maxPage++;
        }
        SetLabelText((Enum)UI.LBL_ARROW_NOW, (maxPage <= 0) ? "0" : currentPage.ToString());
        SetLabelText((Enum)UI.LBL_ARROW_MAX, maxPage.ToString());
        int item_num = Mathf.Min(GameDefine.POINT_SHOP_LIST_COUNT, currentPointShopItem.Count - (currentPage - 1) * GameDefine.POINT_SHOP_LIST_COUNT);

        SetGrid(UI.GRD_NORMAL, "PointShopListItem", item_num, true, delegate(int i, Transform t, bool b)
        {
            int index         = i + (currentPage - 1) * GameDefine.POINT_SHOP_LIST_COUNT;
            object event_data = new object[3]
            {
                currentPointShopItem[index],
                shop,
                new Action <PointShopItem, int>(OnBuy)
            };
            SetEvent(t, "CONFIRM_BUY", event_data);
            PointShopItemList component2 = t.GetComponent <PointShopItemList>();
            component2.SetUp(currentPointShopItem[index], (uint)shop.pointShopId, currentPointShopItem[index].needPoint <= shop.userPoint);
            int num          = -1;
            REWARD_TYPE type = (REWARD_TYPE)currentPointShopItem[index].type;
            if (type == REWARD_TYPE.ITEM)
            {
                num = MonoBehaviourSingleton <InventoryManager> .I.GetHaveingItemNum((uint)currentPointShopItem[index].itemId);
            }
            SetLabelText(t, UI.LBL_HAVE, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 6u), num.ToString()));
            SetActive(t, UI.LBL_HAVE, num >= 0);
        });
        bool flag = pointShop.Any((PointShop x) => x.isEvent);

        SetActive((Enum)UI.OBJ_EVENT_NON_ACTIVE, !flag);
        SetActive((Enum)UI.BTN_EVENT, flag);
    }
Exemple #5
0
 public override void UpdateUI()
 {
     base.UpdateUI();
     if (currentItem != null)
     {
         SetLabelText((Enum)UI.LBL_ITEM_NAME, currentItem.name);
         ItemIcon itemIcon = ItemIcon.CreateRewardItemIcon((REWARD_TYPE)currentItem.type, (uint)currentItem.itemId, GetCtrl(UI.OBJ_ITEM_ICON_ROOT), -1, null, 0, false, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.DEFAULT);
         itemIcon.SetEnableCollider(false);
         ResourceLoad.LoadPointIconImageTexture(GetCtrl(UI.TEX_POINT_ICON).GetComponent <UITexture>(), (uint)pointShop.pointShopId);
     }
     SetLabelText((Enum)UI.LBL_CURRENT_CHANGE_NUM, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), currentNum));
     SetLabelText((Enum)UI.LBL_NEED_POINT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), currentItem.needPoint * currentNum));
 }
Exemple #6
0
    public override void UpdateUI()
    {
        //IL_031e: Unknown result type (might be due to invalid IL or missing references)
        SetFullScreenButton((Enum)UI.BTN_SKIP_FULL_SCREEN);
        SetHeight((Enum)UI.BTN_SKIP_IN_SCROLL, dropLineNum * 100);
        SetActive((Enum)UI.BTN_NEXT, false);
        QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData(MonoBehaviourSingleton <QuestManager> .I.currentQuestID);

        SetLabelText((Enum)UI.LBL_QUEST_NAME, questData.questText);
        string text = string.Format(StringTable.Get(STRING_CATEGORY.RUSH_WAVE, 10004400u), MonoBehaviourSingleton <InGameManager> .I.GetCurrentWaveNum());

        SetLabelText((Enum)UI.LBL_WAVE, text);
        SetLabelText((Enum)UI.LBL_TIME, MonoBehaviourSingleton <InGameProgress> .I.GetRushRemainTimeToString());
        SetActive((Enum)UI.GET_ITEM, true);
        int num = 0;

        if (isVictory)
        {
            List <QuestCompleteRewardList> rushRewards = MonoBehaviourSingleton <InGameManager> .I.rushRewards;
            SetTable(GetCtrl(UI.OBJ_TREASURE_ROOT), UI.TBL_DROP_ITEM, "RushWaveDropItem", resultRewards.Length, true, delegate(int i, Transform t, bool is_recycle)
            {
                t.set_name("wave" + MonoBehaviourSingleton <InGameManager> .I.GetWaveNum(i));
                SetDropItemIcon(resultRewards[i].dropItemIconData, t, MonoBehaviourSingleton <InGameManager> .I.GetWaveNum(i));
            });
            for (int j = 0; j < rushRewards.Count; j++)
            {
                QuestCompleteRewardList questCompleteRewardList = rushRewards[j];
                QuestCompleteReward     dropReward  = resultRewards[j].dropReward;
                QuestCompleteReward     breakReward = questCompleteRewardList.breakReward;
                QuestCompleteReward     order       = questCompleteRewardList.order;
                num = num + dropReward.money + breakReward.money + order.money;
            }
            if (firstRewards.Length > 0)
            {
                SetActive((Enum)UI.OBJ_ARRIVAL_EFFECT_ROOT, true);
                int index = MonoBehaviourSingleton <InGameManager> .I.GetRushIndex() - ((MonoBehaviourSingleton <InGameProgress> .I.progressEndType != InGameProgress.PROGRESS_END_TYPE.QUEST_VICTORY) ? 1 : 0);

                int waveNum = MonoBehaviourSingleton <InGameManager> .I.GetWaveNum(index);

                UISprite component  = GetCtrl(UI.SPR_WAVE_01).GetComponent <UISprite>();
                UISprite component2 = GetCtrl(UI.SPR_WAVE_10).GetComponent <UISprite>();
                UISprite component3 = GetCtrl(UI.SPR_WAVE_100).GetComponent <UISprite>();
                string   text2      = waveNum.ToString("D3");
                component.spriteName  = "RushArrival_Wave_Txt_" + text2[2];
                component2.spriteName = "RushArrival_Wave_Txt_" + text2[1];
                component3.spriteName = ((waveNum < 100) ? string.Empty : ("RushArrival_Wave_Txt_" + text2[0]));
                SetActive((Enum)UI.OBJ_ARRIVAL_EFFECT_ROOT, false);
                SetActive((Enum)UI.OBJ_ARRIVAL_BONUS, true);
                SetGrid(UI.GRD_ARRIVAL_ITEM_ICON, "ItemIconReward", firstRewards.Length, true, delegate(int i, Transform t, bool is_recycle)
                {
                    //IL_0031: Unknown result type (might be due to invalid IL or missing references)
                    PointEventCurrentData.Reward reward = firstRewards[i];
                    ItemIcon.CreateRewardItemIcon((REWARD_TYPE)reward.type, (uint)reward.itemId, t, reward.num, null, 0, false, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.DEFAULT);
                    t.FindChild("itemNum").GetComponent <UILabel>().text = "×" + firstRewards[i].num;
                });
                SetActive((Enum)UI.OBJ_ARRIVAL_BONUS, false);
            }
        }
        SetLabelText((Enum)UI.LBL_REWARD_GOLD, num.ToString("N0"));
        bool flag = pointShopResultData.Count > 0;

        SetActive((Enum)UI.OBJ_POINT_SHOP_RESULT_ROOT, flag);
        if (flag)
        {
            SetGrid(UI.OBJ_POINT_SHOP_RESULT_ROOT, "QuestResultPointShop", pointShopResultData.Count, true, delegate(int i, Transform t, bool b)
            {
                ResetTween(t, 0);
                PointShopResultData pointShopResultData = base.pointShopResultData[i];
                SetActive(t, UI.OBJ_NORMAL_POINT_SHOP_ROOT, !pointShopResultData.isEvent);
                if (!pointShopResultData.isEvent)
                {
                    SetLabelText(t, UI.LBL_NORMAL_GET_POINT_SHOP, string.Format("+" + StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.getPoint));
                    SetLabelText(t, UI.LBL_NORMAL_TOTAL_POINT_SHOP, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.totalPoint));
                    UITexture component4 = FindCtrl(t, UI.TEX_NORMAL_POINT_SHOP_ICON).GetComponent <UITexture>();
                    ResourceLoad.LoadPointIconImageTexture(component4, (uint)pointShopResultData.pointShopId);
                }
                SetActive(t, UI.OBJ_EVENT_POINT_SHOP_ROOT, pointShopResultData.isEvent);
                if (pointShopResultData.isEvent)
                {
                    SetLabelText(t, UI.LBL_EVENT_GET_POINT_SHOP, string.Format("+" + StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.getPoint));
                    SetLabelText(t, UI.LBL_EVENT_TOTAL_POINT_SHOP, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.totalPoint));
                    UITexture component5 = FindCtrl(t, UI.TEX_EVENT_POINT_SHOP_ICON).GetComponent <UITexture>();
                    ResourceLoad.LoadPointIconImageTexture(component5, (uint)pointShopResultData.pointShopId);
                }
            });
        }
        this.StartCoroutine(PlayAnimation());
    }
Exemple #7
0
 protected void SetUpPointIcon(UITexture targetUITexture, uint pointId)
 {
     ResourceLoad.LoadPointIconImageTexture(targetUITexture, pointId);
 }
    public override void UpdateUI()
    {
        //IL_0306: Unknown result type (might be due to invalid IL or missing references)
        allPointEvents = new PointEventCurrentData();
        allPointEvents.pointRankingData = new PointEventCurrentData.PointResultData();
        isVictory = (MonoBehaviourSingleton <QuestManager> .I.arenaCompData != null);
        SetFullScreenButton((Enum)UI.BTN_SKIP_FULL_SCREEN);
        SetActive((Enum)UI.BTN_NEXT, false);
        SetActive((Enum)UI.BTN_RETRY, false);
        SetActive((Enum)UI.OBJ_TIME, false);
        SetActive((Enum)UI.OBJ_CLEAR_EFFECT_ROOT, false);
        SetActive((Enum)UI.OBJ_CLEAR_EFFECT, false);
        SetActive((Enum)UI.OBJ_RANK_UP_ROOT, false);
        SetActive((Enum)UI.OBJ_CONGRATULATIONS_ROOT, false);
        if (m_isTimeAttack)
        {
            SetActive((Enum)UI.OBJ_REMAIN_TIME, false);
            if (isVictory)
            {
                SetActive((Enum)UI.OBJ_TIME, true);
            }
        }
        string arg  = string.Format(StringTable.Get(STRING_CATEGORY.ARENA, 1u), m_rank.ToString());
        string arg2 = string.Format(StringTable.Get(STRING_CATEGORY.ARENA, 0u), m_group.ToString());

        SetLabelText((Enum)UI.LBL_QUEST_NAME, $"{arg} {arg2}");
        List <QuestCompleteRewardList> arenaRewards = MonoBehaviourSingleton <InGameManager> .I.arenaRewards;
        int num  = 0;
        int num2 = 0;

        for (int j = 0; j < arenaRewards.Count; j++)
        {
            QuestCompleteRewardList questCompleteRewardList = arenaRewards[j];
            QuestCompleteReward     drop        = questCompleteRewardList.drop;
            QuestCompleteReward     breakReward = questCompleteRewardList.breakReward;
            QuestCompleteReward     order       = questCompleteRewardList.order;
            num  += drop.exp + breakReward.exp + order.exp;
            num2 += drop.money + breakReward.money + order.money;
        }
        int my_user_id = MonoBehaviourSingleton <UserInfoManager> .I.userInfo.id;

        InGameRecorder.PlayerRecord playerRecord = MonoBehaviourSingleton <InGameRecorder> .I.players.Find((InGameRecorder.PlayerRecord data) => data.charaInfo.userId == my_user_id);

        if (playerRecord.beforeLevel >= Singleton <UserLevelTable> .I.GetMaxLevel())
        {
            num = 0;
        }
        SetLabelText((Enum)UI.LBL_EXP, num.ToString("N0"));
        SetLabelText((Enum)UI.LBL_REWARD_GOLD, num2.ToString("N0"));
        SetLabelText((Enum)UI.LBL_TIME, MonoBehaviourSingleton <InGameProgress> .I.GetArenaRemainTimeToString());
        SetLabelText((Enum)UI.LBL_CLEAR_TIME, InGameProgress.GetTimeWithMilliSecToString(0f));
        SetActive((Enum)UI.SPR_BESTSCORE, false);
        if (isVictory)
        {
            SetLabelText((Enum)UI.LBL_BEFORE_TIME, InGameProgress.GetTimeWithMilliSecToString((float)(int)MonoBehaviourSingleton <QuestManager> .I.arenaCompData.previousClearMilliSec * 0.001f));
        }
        bool flag = pointShopResultData.Count > 0;

        SetActive((Enum)UI.OBJ_POINT_SHOP_RESULT_ROOT, flag);
        if (flag)
        {
            SetGrid(UI.OBJ_POINT_SHOP_RESULT_ROOT, "QuestResultPointShop", pointShopResultData.Count, true, delegate(int i, Transform t, bool b)
            {
                ResetTween(t, 0);
                PointShopResultData pointShopResultData = base.pointShopResultData[i];
                SetActive(t, UI.OBJ_NORMAL_POINT_SHOP_ROOT, !pointShopResultData.isEvent);
                if (!pointShopResultData.isEvent)
                {
                    SetLabelText(t, UI.LBL_NORMAL_GET_POINT_SHOP, string.Format("+" + StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.getPoint));
                    SetLabelText(t, UI.LBL_NORMAL_TOTAL_POINT_SHOP, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.totalPoint));
                    UITexture component = FindCtrl(t, UI.TEX_NORMAL_POINT_SHOP_ICON).GetComponent <UITexture>();
                    ResourceLoad.LoadPointIconImageTexture(component, (uint)pointShopResultData.pointShopId);
                }
                SetActive(t, UI.OBJ_EVENT_POINT_SHOP_ROOT, pointShopResultData.isEvent);
                if (pointShopResultData.isEvent)
                {
                    SetLabelText(t, UI.LBL_EVENT_GET_POINT_SHOP, string.Format("+" + StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.getPoint));
                    SetLabelText(t, UI.LBL_EVENT_TOTAL_POINT_SHOP, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.totalPoint));
                    UITexture component2 = FindCtrl(t, UI.TEX_EVENT_POINT_SHOP_ICON).GetComponent <UITexture>();
                    ResourceLoad.LoadPointIconImageTexture(component2, (uint)pointShopResultData.pointShopId);
                }
            });
        }
        this.StartCoroutine(PlayAnimation());
    }