Пример #1
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());
    }
Пример #2
0
 public void AddWaveResult(QuestCompleteRewardList reward, List <PointEventCurrentData> pointEvent, List <PointShopResultData> pointShop)
 {
     rushRewards.Add(reward);
     rushPointEvents.AddRange(pointEvent);
     AddRushPointShop(pointShop);
 }
Пример #3
0
 public void AddArenaWaveResult(QuestCompleteRewardList reward, List <PointShopResultData> pointShop)
 {
     arenaRewards.Add(reward);
     AddArenaPointShop(pointShop);
 }
    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());
    }