From 8424f7c65dfb9fbc98db77c0c664ced4d4e1a179 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 10:18:07 +0800 Subject: [PATCH 1/8] fix bug --- lua/app/config/localization/localization_global_const.lua | 1 + lua/app/config/strings/cn/global.lua | 1 + lua/app/ui/daily_challenge/daily_challenge_ui.lua | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index 4b00678f..9a99f2db 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -752,6 +752,7 @@ local LocalizationGlobalConst = EQUIP_QLT_SELECT_ALL_1 = "EQUIP_QLT_SELECT_ALL_1", EQUIP_QLT_SELECT_ALL_2 = "EQUIP_QLT_SELECT_ALL_2", REBACK_MATERIAL_DESC = "REBACK_MATERIAL_DESC", + DAILY_CHALLENGE_DESC_9 = "DAILY_CHALLENGE_DESC_9", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index 57e28eb4..194750a4 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -752,6 +752,7 @@ local localization_global = ["EQUIP_QLT_SELECT_ALL_1"] = "所有品质", ["EQUIP_QLT_SELECT_ALL_2"] = "所有部位", ["REBACK_MATERIAL_DESC"] = "分解获得", + ["DAILY_CHALLENGE_DESC_9"] = "难度:{0}", } return localization_global \ No newline at end of file diff --git a/lua/app/ui/daily_challenge/daily_challenge_ui.lua b/lua/app/ui/daily_challenge/daily_challenge_ui.lua index 06404e0c..77cbfbf9 100644 --- a/lua/app/ui/daily_challenge/daily_challenge_ui.lua +++ b/lua/app/ui/daily_challenge/daily_challenge_ui.lua @@ -52,6 +52,7 @@ function DailyChallengeUI:onLoadRootComplete() self.debuffBtn = uiMap["daily_challenge_ui.buffs.debuff"] self.bossSpine = uiMap["daily_challenge_ui.spine_node"] self.countdownTx = uiMap["daily_challenge_ui.countdown.time_tx"] + self.diffTx = uiMap["daily_challenge_ui.diff_tx"] self.fightBtn = uiMap["daily_challenge_ui.fight_btn"] -- 体力消耗 @@ -246,8 +247,8 @@ function DailyChallengeUI:refreshDiffBtn() self.upDiffBtn:setActive(true) local cfg = DataManager.DailyChallengeData:getDifficultyCfg(diffChapter + 1) local chapterId = DataManager.ChapterData:getMaxChapterId() - local chapterPage = DataManager.ChapterData:getChapterPage(diffChapter + 1) - local chapterStage = DataManager.ChapterData:getChapterStage(diffChapter + 1) + local chapterPage = DataManager.ChapterData:getChapterPage(cfg.max_chapter) + local chapterStage = DataManager.ChapterData:getChapterStage(cfg.max_chapter) local str if cfg.max_chapter <= chapterId then str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "(" .. I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_8) .. ")") @@ -257,6 +258,7 @@ function DailyChallengeUI:refreshDiffBtn() self.upDiffBtnDescTx:setText(str) end self.downDiffBtn:setActive(diffChapter > 1) + self.diffTx:setText(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_9, diffChapter)) end return DailyChallengeUI \ No newline at end of file From ba655fa2570be0c8670c32c5a1de2acbdb96cf8f Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 10:56:34 +0800 Subject: [PATCH 2/8] fix bug --- lua/app/ui/common/power_toast_manager.lua | 4 ++-- lua/app/ui/summon/cell/summon_reward_cell.lua | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lua/app/ui/common/power_toast_manager.lua b/lua/app/ui/common/power_toast_manager.lua index 9110dd41..40a51c61 100755 --- a/lua/app/ui/common/power_toast_manager.lua +++ b/lua/app/ui/common/power_toast_manager.lua @@ -27,13 +27,13 @@ function PowerToastManager:showToast(before, after, posY) self.bg = uiMap["power_change_toast.bg"] self.powerTx = uiMap["power_change_toast.bg.power_tx"] self.powerChange = uiMap["power_change_toast.bg.power_change_tx"] - -- self.powerSpine = uiMap["power_change_toast.bg.ui_spine_obj"] + self.powerSpine = uiMap["power_change_toast.bg.ui_spine_obj"] -- self.effect1 = uiMap["power_change_toast.content.vfx_ui_zhanli_b01"] -- self.effect2 = uiMap["power_change_toast.content.vfx_ui_zhanli_b03"] self:showEffect(false) self:showModuleUnlockAppearAnim() - -- self.powerSpine:playAnim("idle", false, true) + self.powerSpine:playAnim("idle", false, true) end) end diff --git a/lua/app/ui/summon/cell/summon_reward_cell.lua b/lua/app/ui/summon/cell/summon_reward_cell.lua index 3069c141..d9a986ff 100755 --- a/lua/app/ui/summon/cell/summon_reward_cell.lua +++ b/lua/app/ui/summon/cell/summon_reward_cell.lua @@ -10,9 +10,9 @@ function SummonRewardCell:init() self.bg = uiMap["summon_reward_cell.bg"] self.bg1 = uiMap["summon_reward_cell.bg1"] self.effectQlts = {} - self.effectQlts[2] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_lan_b01"] - self.effectQlts[3] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_zi_b01"] - self.effectQlts[4] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_cheng_b01"] + self.effectQlts[3] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_lan_b01"] + self.effectQlts[4] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_zi_b01"] + self.effectQlts[5] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_cheng_b01"] end function SummonRewardCell:getEffectQlts() return self.effectQlts @@ -22,9 +22,9 @@ function SummonRewardCell:refresh(reward, index, parentUI) if self.effectQlts[5] then self.effectQlts[5]:setActive(false) end + self.effectQlts[5]:setActive(false) self.effectQlts[4]:setActive(false) self.effectQlts[3]:setActive(false) - self.effectQlts[2]:setActive(false) local cfg = DataManager.HeroData:getHeroConfig(reward.item.id) self.imgIcon:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, tostring(cfg.icon)) self.bg:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, "summon_card_b_" .. cfg.qlt) @@ -38,7 +38,7 @@ function SummonRewardCell:refresh(reward, index, parentUI) end, 0.3) end function SummonRewardCell:playEffect(qlt) - if qlt == 5 and self.effectQlts[5] == nil then + if qlt == 6 and self.effectQlts[6] == nil then local tranInfo = self.imgIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.TRANSFORM).parent if tranInfo then local infoBase = UIPrefabObject:create() @@ -46,11 +46,11 @@ function SummonRewardCell:playEffect(qlt) infoBase:initPrefabHelper() EffectManager:loadUIEffectAsync("assets/prefabs/effects/ui/vfx_b13_chouka_hong_b01.prefab", self.patentUI, infoBase, 0, function(obj) - if self.effectQlts[5] then - self.effectQlts[5]:destroy() - self.effectQlts[5] = nil + if self.effectQlts[6] then + self.effectQlts[6]:destroy() + self.effectQlts[6] = nil end - self.effectQlts[5] = obj + self.effectQlts[6] = obj end) end else From 79bd76cf1d528b7138901b28e39e3373572b05a9 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 11:32:28 +0800 Subject: [PATCH 3/8] fix bug --- lua/app/ui/talent/talent_info_ui.lua | 19 +++++++++++++------ lua/app/userdata/talent/talent_data.lua | 13 +++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/lua/app/ui/talent/talent_info_ui.lua b/lua/app/ui/talent/talent_info_ui.lua index 6e6819c5..78f2d247 100644 --- a/lua/app/ui/talent/talent_info_ui.lua +++ b/lua/app/ui/talent/talent_info_ui.lua @@ -29,20 +29,27 @@ function TalentInfoUI:onLoadRootComplete() end) self.leftArrowBtn:addClickListener(function() - self.id = self.id - 1 + self.idx = self.idx - 1 self:onRefresh() end) self.rightArrowBtn:addClickListener(function() - self.id = self.id + 1 + self.idx = self.idx + 1 self:onRefresh() end) + self.list = DataManager.TalentData:getActiveList() + for i, cfg in ipairs(self.list) do + if cfg.id == self.id then + self.idx = i + break + end + end end function TalentInfoUI:onRefresh() - self.list = DataManager.TalentData:getCfgList() - self.talentCell:refresh(self.id, self.list[self.id]) - self.leftArrowBtn:setActive(self.id > 1) - self.rightArrowBtn:setActive(self.id < #self.list) + self.id = self.list[self.idx].id + self.talentCell:refresh(self.id, self.list[self.idx]) + self.leftArrowBtn:setActive(self.idx > 1 and #self.list ~= 1) + self.rightArrowBtn:setActive(self.idx < #self.list and #self.list ~= 1) local attr, num = DataManager.TalentData:getAttrById(self.id) local str = I18N:getText("talent", self.id, "desc") if attr and #attr > 0 then diff --git a/lua/app/userdata/talent/talent_data.lua b/lua/app/userdata/talent/talent_data.lua index 9fa5d631..00b52d86 100644 --- a/lua/app/userdata/talent/talent_data.lua +++ b/lua/app/userdata/talent/talent_data.lua @@ -28,6 +28,19 @@ function TalentData:getCfgList() return TalentCfg end +function TalentData:getActiveList() + local list = {} + for id = 1, #TalentCfg do + local cfg = TalentCfg[id] + cfg.id = id + local lv = self:getLevels(id) + if lv and lv > 0 then + table.insert(list, cfg) + end + end + return list +end + function TalentData:getPlayerExpCfgList(stage) if stage then return PlayerExpCfg[stage] From 58bcc1f45f37ad0635d5826fba0ece595f4e4889 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 12:00:22 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=BC=95=E5=AF=BC=E5=9D=90=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/battle/battle_ui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index a32aed26..13d88baf 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -244,9 +244,9 @@ function BattleUI:showTutorialFinger(posIdList) for index, posId in ipairs(posIdList) do local curPos = self:getPosInfo(posId) if index == 1 then - self.tutorialFinger:setAnchoredPosition(curPos.x, curPos.y) + self.tutorialFinger:setAnchoredPosition(curPos.x, curPos.y - 47) else - table.insert(path, curPos) + table.insert(path, {x = curPos.x, y = curPos.y - 47}) count = count + 1 end end From 215c258dadeaa042fcfadd4b3497f9f15f88b6b4 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 14:56:34 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=B8=BB=E7=95=8C=E9=9D=A2=E8=8B=B1?= =?UTF-8?q?=E9=9B=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/main_city/component/main_comp.lua | 391 ++----------------- 1 file changed, 42 insertions(+), 349 deletions(-) diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 73667019..9cee2a11 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -7,43 +7,8 @@ local HERO_SPINE_ASSET_PATH = "assets/arts/spines/characters/%s/%s_skeletondata. local CHAPTER_PATH = "assets/prefabs/ui/chapter/%s.prefab" local CHAPTER_PAGE = 5 -function MainComp:onOpen() - self.startMonsterAction = true - if self.bossNode then - self.bossNode:setAnchoredPositionX(0) - end - -- if self.bossShadow then - -- self.bossShadow:setAnchoredPositionX(0) - -- end - if self.dialogueNode then - self.dialogueNode:setAnchoredPositionX(0) - end -end - function MainComp:onClose() - if self.chapterMoveSeq then - self.chapterMoveSeq:Kill() - self.chapterMoveSeq = nil - end - if self.chapterMonsterGenerateSeq then - self.chapterMonsterGenerateSeq:Kill() - self.chapterMonsterGenerateSeq = nil - end self.currChapterId = nil - self.isTopTurn = nil - self.startMonsterAction = false - GFunc.killDOTween(GConst.DOTWEEN_IDS.CHAPTER_MONSTER) - self.monsterSpineTopPool = {} - self.monsterSpineDownPool = {} - self.monsterSpineTopList = {} - self.monsterSpineDownList = {} - -- self.monsterShadowPool = {} - self.monsterSmokePool = {} - self.monsterNodeTop:removeAllChildren() - self.monsterNodeDown:removeAllChildren() - -- self.shadowNode:removeAllChildren() - self.smokeNodeTop:removeAllChildren() - self.smokeNodeDown:removeAllChildren() end function MainComp:init() @@ -58,22 +23,6 @@ function MainComp:init() self.dailyChallengeBtn = uiMap["main_comp.daily_challenge_btn"] self.chapterBg = uiMap["main_comp.bg"] - -- self.chapterBg:setAnchoredPositionX(-720) - self.smokeNodeTop = uiMap["main_comp.smoke_node_1"] - self.monsterNodeTop = uiMap["main_comp.monster_node_1"] - self.bossNode = uiMap["main_comp.boss_node"] - self.bossNode:setActive(false) - self.bossSpine = uiMap["main_comp.boss_node.boss"] - self.smokeNodeDown = uiMap["main_comp.smoke_node_2"] - self.monsterNodeDown = uiMap["main_comp.monster_node_2"] - self.monsterSpineTopPool = {} - self.monsterSpineDownPool = {} - self.monsterSpineTopList = {} - self.monsterSpineDownList = {} - -- self.monsterShadowPool = {} - self.monsterSmokePool = {} - self.startMonsterAction = true - self.fightBtn = uiMap["main_comp.fight_btn"] -- 体力消耗 self.fightCost = uiMap["main_comp.fight_btn.cost"] @@ -89,6 +38,20 @@ function MainComp:init() self.leftBtn = uiMap["main_comp.left_btn"] self.rightBtn = uiMap["main_comp.right_btn"] + self.heroSpineList = {} + self.heroNodeList = {} + for i = 1, 5 do + self.heroNodeList[i] = uiMap["main_comp.formation.hero_" .. i] + self.heroNodeList[i]:addClickListener(function() + local heroId = self.curFormation[i] + if heroId then + local hero = DataManager.HeroData:getHeroById(heroId) + if hero then + ModuleManager.HeroManager:showHeroDetailUI(heroId, nil, nil, GConst.BattleConst.FORMATION_TYPE.STAGE) + end + end + end) + end self.chapterMiddleBg = uiMap["main_comp.middle_bg"] self.chapterTx = uiMap["main_comp.middle_bg.chapter_tx"] @@ -181,6 +144,7 @@ end function MainComp:refresh() self:refreshChapter() self:refreshRedPoint() + self:refreshHero() end function MainComp:refreshChapter(force) @@ -192,12 +156,9 @@ function MainComp:refreshChapter(force) self.chapterStage = DataManager.ChapterData:getChapterStage(chapterId) self:refreshChapterBg() self:refreshFightBtn() - self:doBossAction() end self.currChapterId = chapterId self:refreshChapterInfo() - -- self:doChapterMove() - -- self:doMonsterAction() self:refreshChapterBtn() self.leftBtn:setActive(ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.IDLE_DROP, true)) @@ -333,304 +294,36 @@ end function MainComp:getSummonBtnPosition() return self.rightBtn:getPosition() end --- region 动画 --- function MainComp:doChapterMove() --- if self.chapterMoveSeq then --- return --- end --- self.chapterBg:setAnchoredPositionX(-720) --- self.chapterMoveSeq = self.chapterBg:createBindTweenSequence() --- local moveTween = self.chapterBg:getTransform():DOAnchorPosX(720, 20):SetEase(CS.DG.Tweening.Ease.Linear) --- self.chapterMoveSeq:Append(moveTween) --- self.chapterMoveSeq:AppendCallback(function() --- self.chapterBg:setAnchoredPositionX(-720) --- end) --- self.chapterMoveSeq:SetLoops(-1) --- end -function MainComp:doBossAction() - if self.currChapterId == nil then - return - end - local chapterInfo = ConfigManager:getConfig("chapter")[self.currChapterId] - if chapterInfo == nil then - return - end - local monsterIdList = chapterInfo.monster - -- monsterIdList = {20001, 10001, 10002} - if monsterIdList == nil then - return - end - self.chapterMonsterShowList = monsterIdList - if self.chapterBossId == nil then -- 还没显示boss模型 - self.chapterBossId = self.chapterMonsterShowList[#self.chapterMonsterShowList] - local chapterBossId = self.chapterBossId - local monsterCfg = ConfigManager:getConfig("monster") - local monsterInfo = monsterCfg[self.chapterBossId] - if monsterInfo then - local modelId = monsterInfo.model_id - local path = string.format(HERO_SPINE_ASSET_PATH, modelId, modelId) - self.bossNode:setActive(false) - local scale = monsterInfo.ui or 1 - self.bossSpine:loadAssetAsync(modelId, function() - if chapterBossId == self.chapterBossId then - self.bossNode:setActive(true) - self.bossSpine:setLocalScale(scale, scale, scale) - self.bossSpine:playAnim("move", true, true, true) - else -- 加载完成后,已经切换到其他boss了 - self:doChangeBossAction() - end - end, path) - end - else - local chapterBossId = self.chapterMonsterShowList[#self.chapterMonsterShowList] - if self.chapterBossId ~= chapterBossId then - self.chapterBossId = chapterBossId - self:doChangeBossAction() - end - end -end - --- 切换boss -function MainComp:doChangeBossAction() - local chapterBossId = self.chapterBossId - local monsterCfg = ConfigManager:getConfig("monster") - local monsterInfo = monsterCfg[self.chapterBossId] - if monsterInfo then - local modelId = monsterInfo.model_id - local path = string.format(HERO_SPINE_ASSET_PATH, modelId, modelId) - self.bossNode:setActive(false) - local scale = monsterInfo.ui or 1 - self.bossSpine:loadAssetAsync(modelId, function() - if chapterBossId == self.chapterBossId then - self.bossNode:setActive(true) - self.bossSpine:setLocalScale(scale, scale, scale) - self.bossSpine:playAnim("move", true, true, true) - else -- 加载完成后,已经切换到其他boss了 - self:doChangeBossAction() +function MainComp:refreshHero() + self.curFormation = DataManager.FormationData:getStageFormation() + for i = 1, 5 do + local heroId = self.curFormation[i] + local hero = DataManager.HeroData:getHeroById(heroId) + if hero and hero:getLv() > 0 then + if self.heroSpineList[i] and self.heroSpineList[i]:getModelId() == hero:getModelId() then + self.heroSpineList[i]:setActive(true) + self.heroSpineList[i]:playAnimation("move", true) + else + SpineManager:loadHeroAsync(hero:getModelId(), self.heroNodeList[i], function(spineObject) + if heroId ~= self.curFormation[i] then + return + end + if self.heroSpineList[i] then + self.heroSpineList[i]:destroy() + end + spineObject:playAnimation("move", true) + spineObject:setLocalScale(0.7, 0.7, 0.7) + self.heroSpineList[i] = spineObject + self.heroSpineList[i]:setLocalPosition(0, -60, 0) + end) end - end, path) + else + if self.heroSpineList[i] then + self.heroSpineList[i]:setActive(false) + end + end end end --- function MainComp:doMonsterAction() --- if self.chapterMonsterGenerateSeq then --- return --- end --- self.chapterMonsterGenerateSeq = DOTweenManager:createSeqWithIntId() --- local interval = GFunc.getConstValue("chapter_idel_monster_x") / 1000 --- interval = 2 --- self.chapterMonsterGenerateSeq:AppendCallback(function() --- self:generateChapterMonsters() --- end) --- self.chapterMonsterGenerateSeq:AppendInterval(interval) --- self.chapterMonsterGenerateSeq:SetLoops(-1) --- end - --- function MainComp:generateChapterMonsters() --- local monsterId --- if #self.chapterMonsterShowList <= 2 then --- monsterId = self.chapterMonsterShowList[2] --- else --- monsterId = self.chapterMonsterShowList[math.random(2, #self.chapterMonsterShowList)] --- end --- if monsterId == nil then --- return --- end --- local monsterCfg = ConfigManager:getConfig("monster_base") --- local monsterInfo = monsterCfg[monsterId] --- if monsterInfo == nil then --- return --- end --- if self.isTopTurn == nil then --- self.isTopTurn = math.random(1, 100) > 50 --- end --- local modelId = monsterInfo.model_id --- local pool --- local list --- local parent --- local posY --- if self.isTopTurn then -- 刷上面 --- pool = self.monsterSpineTopPool[modelId] --- list = self.monsterSpineTopList --- parent = self.monsterNodeTop --- posY = math.random(1, 300) --- else -- 刷下面 --- pool = self.monsterSpineDownPool[modelId] --- list = self.monsterSpineDownList --- parent = self.monsterNodeDown --- posY = -math.random(1, 240) --- end --- self.isTopTurn = not self.isTopTurn --- if pool and #pool > 0 then --- local spine = table.remove(pool) --- table.insert(list, spine) --- spine:setActive(true) --- self:doMonsterMove(modelId, spine, posY, monsterInfo, not self.isTopTurn) --- else --- SpineManager:loadUIHeroSpineWidgetAsync(modelId, parent, function(spine) --- if not self.startMonsterAction then --- spine:destroy() --- return --- end --- table.insert(list, spine) --- local scale = monsterInfo.ui or 1 --- spine:setLocalScale(-scale, scale, scale) --- self:doMonsterMove(modelId, spine, posY, monsterInfo, not self.isTopTurn) --- end) --- end --- end - --- function MainComp:doMonsterMove(modelId, spine, posY, monsterInfo, isTopTurn) --- spine:playAnim("move", true, true, true) --- local posX = GConst.UI_SCREEN_WIDTH / 2 + 100 --- local targetPosX = -GConst.UI_SCREEN_WIDTH / 2 - 300 --- spine:setAnchoredPosition(posX, posY) --- local seq = DOTweenManager:createSeqWithIntId(GConst.DOTWEEN_IDS.CHAPTER_MONSTER) --- if self.chapterMonsterSpeed == nil then --- -- self.chapterMonsterSpeed = GFunc.getConstValue("chapter_idel_monstermove") --- self.chapterMonsterSpeed = 150 --- end --- local distance = posX - targetPosX --- local moveTime = distance / self.chapterMonsterSpeed --- local moveTween = spine:getTransform():DOAnchorPosX(targetPosX, moveTime):SetEase(CS.DG.Tweening.Ease.Linear) --- seq:Append(moveTween) --- end - --- function MainComp:enterChapterBattle() --- -- boss等一会再跑 --- local bossWaitTime = GFunc.getConstValue("chapter_fight_bosswait") / 1000 --- local bossSeq = DOTweenManager:createSeqWithIntId(GConst.DOTWEEN_IDS.CHAPTER_MONSTER) --- bossSeq:AppendInterval(bossWaitTime) --- local bossSpeed = GFunc.getConstValue("chapter_fight_bossmove") --- local distance = GConst.UI_SCREEN_WIDTH/2 + 100 --- local moveTime = distance / bossSpeed --- local targetPosX = -GConst.UI_SCREEN_WIDTH / 2 - 300 --- local moveTween = self.bossNode:getTransform():DOAnchorPosX(targetPosX, moveTime):SetEase(CS.DG.Tweening.Ease.Linear) --- bossSeq:Append(moveTween) --- local moveTween2 = self.dialogueNode:getTransform():DOAnchorPosX(targetPosX, moveTime):SetEase(CS.DG.Tweening.Ease.Linear) --- bossSeq:Join(moveTween2) --- -- local moveTween3 = self.bossShadow:getTransform():DOAnchorPosX(targetPosX, moveTime):SetEase(CS.DG.Tweening.Ease.Linear) --- -- bossSeq:Join(moveTween3) - - --- -- 出来一批小怪从右边跑向左边 --- local monsterCount = GFunc.getConstIntValue("chapter_fight_monster_num") --- self.chapterFightMonsterCount = monsterCount --- local wave = 5 --- local monsterCountPerWave = math.ceil(monsterCount / wave) --- -- 分批处理 --- local monsterSeq = DOTweenManager:createSeqWithIntId(GConst.DOTWEEN_IDS.CHAPTER_MONSTER) --- for i = 1, wave do --- monsterSeq:AppendCallback(function () --- if monsterCountPerWave > monsterCount then --- monsterCountPerWave = monsterCount --- end --- monsterCount = monsterCount - monsterCountPerWave --- for j = 1, monsterCountPerWave do --- self:generateChapterFightMonsters() --- end --- end) --- monsterSeq:AppendInterval(0.03) --- end --- return GFunc.getConstValue("chapter_fight_wait") / 1000 --- end - --- function MainComp:generateChapterFightMonsters() --- local monsterId --- if #self.chapterMonsterShowList <= 2 then --- monsterId = self.chapterMonsterShowList[2] --- else --- monsterId = self.chapterMonsterShowList[math.random(2, #self.chapterMonsterShowList)] --- end --- if monsterId == nil then --- return --- end --- local monsterCfg = ConfigManager:getConfig("monster_base") --- local monsterInfo = monsterCfg[monsterId] --- if monsterInfo == nil then --- return --- end --- local modelId = monsterInfo.model_id --- local pool --- local list --- local parent --- local posY --- if self.isTopTurn then -- 刷上面 --- pool = self.monsterSpineTopPool[modelId] --- list = self.monsterSpineTopList --- parent = self.monsterNodeTop --- posY = math.random(1, 300) --- else -- 刷下面 --- pool = self.monsterSpineDownPool[modelId] --- list = self.monsterSpineDownList --- parent = self.monsterNodeDown --- posY = -math.random(1, 240) --- end --- self.isTopTurn = not self.isTopTurn --- if pool and #pool > 0 then --- local spine = table.remove(pool) --- table.insert(list, spine) --- spine:setActive(true) --- self:doMonsterFightMove(modelId, spine, posY, monsterInfo, not self.isTopTurn) --- else --- SpineManager:loadUIHeroSpineWidgetAsync(modelId, parent, function(spine) --- if not self.startMonsterAction then --- spine:destroy() --- return --- end --- table.insert(list, spine) --- local scale = monsterInfo.ui or 1 --- spine:setLocalScale(-scale, scale, scale) --- self:doMonsterFightMove(modelId, spine, posY, monsterInfo, not self.isTopTurn) --- end) --- end --- end - --- function MainComp:doMonsterFightMove(modelId, spine, posY, monsterInfo, isTopTurn) --- spine:playAnim("move", true, true, true) --- local posX = GConst.UI_SCREEN_WIDTH / 2 + math.random(100, math.floor(GConst.UI_SCREEN_WIDTH*2/3)) --- spine:setAnchoredPosition(posX, posY) --- local seq = DOTweenManager:createSeqWithIntId(GConst.DOTWEEN_IDS.CHAPTER_MONSTER) --- if self.chapterMonsterFightSpeed == nil then --- -- self.chapterMonsterFightSpeed = GFunc.getConstValue("chapter_fight_monstermove") --- self.chapterMonsterFightSpeed = 880 --- end --- local distance = posX + GConst.UI_SCREEN_WIDTH/2 + 100 --- local moveTime = distance / self.chapterMonsterFightSpeed --- local targetPosX = -GConst.UI_SCREEN_WIDTH / 2 - 100 --- local moveTween = spine:getTransform():DOAnchorPosX(targetPosX, moveTime):SetEase(CS.DG.Tweening.Ease.Linear) --- seq:Append(moveTween) - --- if self.chapterFightMonsterCount then --- self.chapterFightMonsterCount = self.chapterFightMonsterCount - 1 --- if self.chapterFightMonsterCount == 0 then -- 最后一个怪物生成完毕后,重新排一下序 --- self:sortChapterFightMonstersOrder() --- self:sortChapterFightMonstersOrder() --- self:sortChapterFightMonstersOrder() --- self:sortChapterFightMonstersOrder() --- end --- end --- end - --- function MainComp:sortChapterFightMonstersOrder() --- self:sortChildrenOrder(self.monsterNodeTop) --- self:sortChildrenOrder(self.monsterNodeDown) --- end - --- function MainComp:sortChildrenOrder(parent) --- local children = parent:getChildList() --- if children and #children > 0 then --- table.sort(children, function(a, b) --- return a:getAnchoredPositionY() > b:getAnchoredPositionY() --- end) - --- for i = #children, 1, -1 do --- children[i]:getTransform():SetSiblingIndex(i - 1) --- end --- end --- end - --- endregion - return MainComp \ No newline at end of file From 24e9b0bc4509ce1be2239883490316875dd710ba Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 16:08:20 +0800 Subject: [PATCH 6/8] fix bug --- lua/app/config/strings/cn/global.lua | 2 +- lua/app/ui/main_city/chapter_box_ui.lua | 4 +++- lua/app/ui/summon/summon_main_ui.lua | 4 ++-- lua/app/ui/talent/talent_info_ui.lua | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index 194750a4..ff7f78fe 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -634,7 +634,7 @@ local localization_global = ["EVENT_COUNTDOWN"] = "活动倒计时:", ["SUMMON_FREE_TIME"] = "{0}后免费", ["SUMMON_FORCE_4"] = "{0}次内必出传说英雄", - ["ITEM_NOT_ENOUGH_DESC"] = "是否使用钻石*{0}补充魔法石*{1},进行召唤?", + ["ITEM_NOT_ENOUGH_DESC"] = "是否使用钻石*{0}补充{1}*{2},进行召唤?", ["SUMMON_ONE"] = "召唤1次", ["SUMMON_TEN"] = "召唤10次", ["FREE_DESC_1"] = "本次免费", diff --git a/lua/app/ui/main_city/chapter_box_ui.lua b/lua/app/ui/main_city/chapter_box_ui.lua index 0becc8b7..d0b7af5e 100644 --- a/lua/app/ui/main_city/chapter_box_ui.lua +++ b/lua/app/ui/main_city/chapter_box_ui.lua @@ -14,10 +14,12 @@ end function ChapterBoxUI:onLoadRootComplete() local uiMap = self.root:genAllChildren() - uiMap["chapter_box_ui.bg.close_btn"]:addClickListener(function() self:closeUI() end) + uiMap["chapter_box_ui.mask"]:addClickListener(function() + self:closeUI() + end) self.selImg = uiMap["chapter_box_ui.bg.bg1.sel_img"] self.maxWaveTx = uiMap["chapter_box_ui.bg.max_wave_tx"] diff --git a/lua/app/ui/summon/summon_main_ui.lua b/lua/app/ui/summon/summon_main_ui.lua index d2408687..443df7be 100755 --- a/lua/app/ui/summon/summon_main_ui.lua +++ b/lua/app/ui/summon/summon_main_ui.lua @@ -338,7 +338,7 @@ function SummonMainUI:onSummon(count, isAd) local costNum = (count - DataManager.BagData.ItemData:getItemNumById(costId)) local gemCost = DataManager.SummonData:getSummonGemCost(self.page) local costGemNum = gemCost.num * costNum - params.content = I18N:getGlobalText(I18N.GlobalConst.ITEM_NOT_ENOUGH_DESC, costGemNum, costNum) + params.content = I18N:getGlobalText(I18N.GlobalConst.ITEM_NOT_ENOUGH_DESC, costGemNum, GFunc.getRewardName(GConst.REWARD_TYPE.ITEM, costId), costNum) params.boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL params.showToday = GConst.MESSAGE_BOX_SHOW_TODAY.SUMMON_FORCE params.okFunc = function() @@ -355,7 +355,7 @@ function SummonMainUI:onSummon(count, isAd) return else for i, cost in ipairs(costs) do - if not GFunc.checkCost(cost.id, GFunc.getRewardNum(cost), true) then + if not GFunc.checkCost(cost.id, GFunc.getRewardNum(cost) * count, true) then return end end diff --git a/lua/app/ui/talent/talent_info_ui.lua b/lua/app/ui/talent/talent_info_ui.lua index 78f2d247..f7a47bb5 100644 --- a/lua/app/ui/talent/talent_info_ui.lua +++ b/lua/app/ui/talent/talent_info_ui.lua @@ -17,6 +17,9 @@ end function TalentInfoUI:onLoadRootComplete() local uiMap = self.root:genAllChildren() + self.root:addClickListener(function() + self:closeUI() + end) self.talentCell = uiMap["talent_info_ui.node.talent_cell"]:addLuaComponent(TALENT_CELL) self.descTx = uiMap["talent_info_ui.desc_tx"] @@ -24,9 +27,6 @@ function TalentInfoUI:onLoadRootComplete() self.rightArrowBtn = uiMap["talent_info_ui.right_arrow_btn"] local continue = uiMap["talent_info_ui.continue"] continue:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE)) - continue:addClickListener(function() - self:closeUI() - end) self.leftArrowBtn:addClickListener(function() self.idx = self.idx - 1 From f72d703afcc3c8d9fb1742416536d892676d8e12 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 17:14:03 +0800 Subject: [PATCH 7/8] fix bug --- lua/app/ui/tips/help_tips.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/app/ui/tips/help_tips.lua b/lua/app/ui/tips/help_tips.lua index f2aad777..6afbbde0 100644 --- a/lua/app/ui/tips/help_tips.lua +++ b/lua/app/ui/tips/help_tips.lua @@ -90,8 +90,8 @@ function HelpTips:showStyleArena() self.arenaTxClose:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK)) self.arenaTxDesc:setText(self.params.desc) - local height = self.arenaTxDesc:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredHeight - self.arenaContent:setSizeDeltaY(height + 5) + local height = self.arenaTxDesc:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredHeight + 5 + self.arenaContent:setSizeDeltaY(math.max(height, 360)) self.arenaContent:setAnchoredPosition(0, 0) end From f4e02995ad017f0ede2481007198533cf39a48bd Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 22 Sep 2025 17:37:32 +0800 Subject: [PATCH 8/8] fix bug --- lua/app/ui/main_city/component/main_comp.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 9cee2a11..661314f8 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -230,7 +230,13 @@ function MainComp:refreshChapterInfo() end self.chapterPageNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout() - self.fightBtn:setActive(chapterId <= chapterMaxId + 1) + if chapterId <= chapterMaxId + 1 then + self.fightBtn:setTouchEnable(true) + self.fightBtn:setSprite(GConst.ATLAS_PATH.MAIN, "main_btn_1") + else + self.fightBtn:setTouchEnable(false) + self.fightBtn:setSprite(GConst.ATLAS_PATH.MAIN, "main_btn_4") + end local chapterI18NInfo = I18N:getConfig("chapter")[chapterId] if chapterI18NInfo then