From 6e938240d7d5e07a869db206c4a4950ae8a274a2 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Fri, 29 Aug 2025 11:57:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=BA=E6=99=AF3=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/global/global_const.lua | 1 - lua/app/ui/battle/battle_base_ui.lua | 4 ++-- lua/app/ui/battle/battle_chapter_bg_comp.lua | 8 ++++---- lua/app/ui/main_city/component/main_comp.lua | 6 +++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index 9789feaf..b37c38a6 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -239,7 +239,6 @@ GConst.ATLAS_PATH = { UI_TASK = "assets/arts/atlas/ui/task.asset", ACT_HEROFUND = "assets/arts/atlas/ui/act_herofund.asset", ACT_BOSS_RUSH = "assets/arts/atlas/ui/act_bossrush.asset", - UI_CHAPTER = "assets/arts/atlas/ui/chapter.asset", UI_DUNGEON_RUNE = "assets/arts/atlas/ui/dungeon_rune.asset", UI_ACT_PVP = "assets/arts/atlas/ui/act_pvp.asset", UI_TALENT = "assets/arts/atlas/ui/talent.asset", diff --git a/lua/app/ui/battle/battle_base_ui.lua b/lua/app/ui/battle/battle_base_ui.lua index 9d98fa02..e21e6870 100644 --- a/lua/app/ui/battle/battle_base_ui.lua +++ b/lua/app/ui/battle/battle_base_ui.lua @@ -6,7 +6,7 @@ local GRID_CELL_PATH = "assets/prefabs/ui/battle/cell/grid_cell.prefab" local SKILL_NODE_CELL = "app/ui/battle/cell/skill_node_cell" local TINY_BUFF_CELL = "app/ui/battle/cell/tiny_buff_cell" local BOSS_SKILL_CELL = "app/ui/battle/cell/boss_skill_cell" -local BG_PATH = "assets/arts/textures/background/battle/%s.png" +local BG_PATH = "assets/arts/textures/background/chapter/%s.png" local BATTLE_COMMON_PATH = "assets/arts/textures/background/battle_common/%s.png" local GRID_EDGE_CELL = "app/ui/battle/cell/grid_edge_cell" local CHAPTER_BG_COMP = "app/ui/battle/battle_chapter_bg_comp" @@ -1207,7 +1207,7 @@ function BattleBaseUI:initChapterBg() local chapterId = DataManager.ChapterData:getChapterId() local icon = DataManager.ChapterData:getChapterCfg()[chapterId].icon local scene = DataManager.ChapterData:getChapterCfg()[chapterId].scene - self.bg:setSprite(GConst.ATLAS_PATH.UI_CHAPTER, scene) + -- self.bg:setTexture(string.format(CHAPTER_PATH, scene)) local bgPath = string.format(CHAPTER_BG_PATH, icon) CellManager:loadCellAsync(bgPath, CHAPTER_BG_COMP, self.mapNode, function(cell) cell:pause() diff --git a/lua/app/ui/battle/battle_chapter_bg_comp.lua b/lua/app/ui/battle/battle_chapter_bg_comp.lua index cc9c06b7..45c7525a 100644 --- a/lua/app/ui/battle/battle_chapter_bg_comp.lua +++ b/lua/app/ui/battle/battle_chapter_bg_comp.lua @@ -2,12 +2,12 @@ local BattleChapterBgComp = class("BattleChapterBgComp", LuaComponent) function BattleChapterBgComp:init() local uiMap = self.baseObject:genAllChildren() - local buildNode = uiMap["chapter_1_1.build_node"] + local buildNode = uiMap["chapter.build_node"] self.allObj = {} for i = 1, 3 do - local bg = uiMap["chapter_1_1.bg_" .. i] - local bg1 = uiMap["chapter_1_1.prospect_" .. i] - local bg2 = uiMap["chapter_1_1.middle_" .. i] + local bg = uiMap["chapter.bg_" .. i] + local bg1 = uiMap["chapter.prospect_" .. i] + local bg2 = uiMap["chapter.middle_" .. i] if bg then table.insert(self.allObj, bg) end diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 3f00707c..7edfbd26 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -2,7 +2,7 @@ local MainComp = class("MainComp", LuaComponent) local UISpineObject = require "app/bf/unity/ui_spine_object" --- local CHAPTER_PATH = "assets/arts/textures/background/chapter/%s.png" +local CHAPTER_BG_PATH = "assets/arts/textures/background/chapter/%s.png" local HERO_SPINE_ASSET_PATH = "assets/arts/spines/characters/%s/%s_skeletondata.asset" local CHAPTER_PATH = "assets/prefabs/ui/chapter/%s.prefab" local CHAPTER_PAGE = 5 @@ -216,7 +216,7 @@ function MainComp:refreshChapterBg() self.chapterScenes[self.currScenePath]:setActive(false) end self.currScenePath = bgPath - self.chapterBg:setSprite(GConst.ATLAS_PATH.UI_CHAPTER, scene) + self.chapterBg:setTexture(string.format(CHAPTER_BG_PATH, scene)) else self.isLoading = true local oldPath = self.currScenePath @@ -227,7 +227,7 @@ function MainComp:refreshChapterBg() end self.currScenePath = bgPath self.chapterScenes[self.currScenePath] = prefab - self.chapterBg:setSprite(GConst.ATLAS_PATH.UI_CHAPTER, scene) + self.chapterBg:setTexture(string.format(CHAPTER_BG_PATH, scene)) end) end end