Exemplo n.º 1
0
        public void OnLevelSelect(int lv)
        {
            mLevel = lv;
            int level = LTInstanceUtil.GetChallengeLevel(mLevel);

            mTaskId = 7000 + level;
            InitState();
            InitItem();
        }
Exemplo n.º 2
0
        public override IEnumerator OnAddToStack()
        {
            yield return(base.OnAddToStack());

            DataLookupsCache.Instance.SearchIntByID("userCampaignStatus.challengeChapters.curLevel", out m_CurLevel);

            int showLevel = LTInstanceUtil.GetChallengeLevel(m_CurLevel);

            LTUIUtil.SetText(LevelLabel, string.Format(EB.Localizer.GetString("ID_codefont_in_LTChallengeInstanceLoadCtrl_1580"), showLevel));
        }
Exemplo n.º 3
0
        public override void Fill(Hotfix_LT.Data.LostChallengeChapter itemData)
        {
            curLevelData = itemData;

            int maxLevel = 0;

            DataLookupsCache.Instance.SearchIntByID("userCampaignStatus.challengeChapters.bigFloor", out maxLevel);

            isLock = curLevelData.CurChapter > maxLevel + 1;

            UnlockTran.gameObject.CustomSetActive(!isLock);

            LockTran.gameObject.CustomSetActive(isLock);

            if (!isLock)
            {
                int level = curLevelData.CurChapter;
                LevelNumLabel.text = string.Format(EB.Localizer.GetString("ID_codefont_in_EconomyTemplateManager_68326"), level);

                SelectSprite.gameObject.CustomSetActive(curLevelData.Level == LTChallengeInstanceSelectHudController.CurSelectLevel);

                int    taskId = 7000 + curLevelData.CurChapter;
                string state  = string.Empty;
                DataLookupsCache.Instance.SearchDataByID(string.Format("tasks.{0}.state", taskId), out state);
                RedPoint.CustomSetActive(state == "finished");

                int floor = LTInstanceUtil.GetChallengeLevel(curLevelData.Level);
                Hotfix_LT.Data.LostChallengeRewardTemplate temp = Hotfix_LT.Data.SceneTemplateManager.Instance.GetLostChallengeReward(System.DateTime.Now.DayOfWeek, floor);
                if (temp != null)
                {
                    string id   = temp.DropList[0];
                    var    item = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetItem(id);
                    BGSprite.spriteName = string.Format("Goods_Source_Tiaozhanfuben_{0}", item.QualityLevel - 1);
                }
            }
            else
            {
                RedPoint.CustomSetActive(false);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 更新掉落物品信息
        /// </summary>
        private void InitDrop()
        {
            int floor = LTInstanceUtil.GetChallengeLevel(CurSelectLevel);

            Hotfix_LT.Data.LostChallengeRewardTemplate temp = Hotfix_LT.Data.SceneTemplateManager.Instance.GetLostChallengeReward(System.DateTime.Now.DayOfWeek, floor);
            List <string> itemList = temp.DropList;

            if (itemList != null)
            {
                for (int i = 0; i < DropItemList.Count; i++)
                {
                    if (i < itemList.Count)
                    {
                        DropItemList[i].mDMono.gameObject.CustomSetActive(true);
                        DropItemList[i].LTItemData = new LTShowItemData(itemList[i], 0, LTShowItemType.TYPE_GAMINVENTORY);
                        DropItemList[i].SetDropRateText(string.Format("{0}%", temp.DropRate * 100));
                    }
                    else
                    {
                        DropItemList[i].mDMono.gameObject.CustomSetActive(false);
                    }
                }
            }
            if (DropItemList.Count > 0)
            {
                if (BGFxList != null)
                {
                    int select = DropItemList[0].QualityLevel - 2;
                    for (var i = 0; i < BGFxList.Count; ++i)
                    {
                        var fx = BGFxList[i];
                        fx.gameObject.CustomSetActive(i == select);
                    }
                }
            }

            ShowHideItemEquipmentWish();
        }