场景3 4

This commit is contained in:
puxuan 2025-08-29 11:57:13 +08:00
parent 15f5bdca59
commit 6e938240d7
4 changed files with 9 additions and 10 deletions

View File

@ -239,7 +239,6 @@ GConst.ATLAS_PATH = {
UI_TASK = "assets/arts/atlas/ui/task.asset", UI_TASK = "assets/arts/atlas/ui/task.asset",
ACT_HEROFUND = "assets/arts/atlas/ui/act_herofund.asset", ACT_HEROFUND = "assets/arts/atlas/ui/act_herofund.asset",
ACT_BOSS_RUSH = "assets/arts/atlas/ui/act_bossrush.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_DUNGEON_RUNE = "assets/arts/atlas/ui/dungeon_rune.asset",
UI_ACT_PVP = "assets/arts/atlas/ui/act_pvp.asset", UI_ACT_PVP = "assets/arts/atlas/ui/act_pvp.asset",
UI_TALENT = "assets/arts/atlas/ui/talent.asset", UI_TALENT = "assets/arts/atlas/ui/talent.asset",

View File

@ -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 SKILL_NODE_CELL = "app/ui/battle/cell/skill_node_cell"
local TINY_BUFF_CELL = "app/ui/battle/cell/tiny_buff_cell" local TINY_BUFF_CELL = "app/ui/battle/cell/tiny_buff_cell"
local BOSS_SKILL_CELL = "app/ui/battle/cell/boss_skill_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 BATTLE_COMMON_PATH = "assets/arts/textures/background/battle_common/%s.png"
local GRID_EDGE_CELL = "app/ui/battle/cell/grid_edge_cell" local GRID_EDGE_CELL = "app/ui/battle/cell/grid_edge_cell"
local CHAPTER_BG_COMP = "app/ui/battle/battle_chapter_bg_comp" local CHAPTER_BG_COMP = "app/ui/battle/battle_chapter_bg_comp"
@ -1207,7 +1207,7 @@ function BattleBaseUI:initChapterBg()
local chapterId = DataManager.ChapterData:getChapterId() local chapterId = DataManager.ChapterData:getChapterId()
local icon = DataManager.ChapterData:getChapterCfg()[chapterId].icon local icon = DataManager.ChapterData:getChapterCfg()[chapterId].icon
local scene = DataManager.ChapterData:getChapterCfg()[chapterId].scene 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) local bgPath = string.format(CHAPTER_BG_PATH, icon)
CellManager:loadCellAsync(bgPath, CHAPTER_BG_COMP, self.mapNode, function(cell) CellManager:loadCellAsync(bgPath, CHAPTER_BG_COMP, self.mapNode, function(cell)
cell:pause() cell:pause()

View File

@ -2,12 +2,12 @@ local BattleChapterBgComp = class("BattleChapterBgComp", LuaComponent)
function BattleChapterBgComp:init() function BattleChapterBgComp:init()
local uiMap = self.baseObject:genAllChildren() local uiMap = self.baseObject:genAllChildren()
local buildNode = uiMap["chapter_1_1.build_node"] local buildNode = uiMap["chapter.build_node"]
self.allObj = {} self.allObj = {}
for i = 1, 3 do for i = 1, 3 do
local bg = uiMap["chapter_1_1.bg_" .. i] local bg = uiMap["chapter.bg_" .. i]
local bg1 = uiMap["chapter_1_1.prospect_" .. i] local bg1 = uiMap["chapter.prospect_" .. i]
local bg2 = uiMap["chapter_1_1.middle_" .. i] local bg2 = uiMap["chapter.middle_" .. i]
if bg then if bg then
table.insert(self.allObj, bg) table.insert(self.allObj, bg)
end end

View File

@ -2,7 +2,7 @@ local MainComp = class("MainComp", LuaComponent)
local UISpineObject = require "app/bf/unity/ui_spine_object" 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 HERO_SPINE_ASSET_PATH = "assets/arts/spines/characters/%s/%s_skeletondata.asset"
local CHAPTER_PATH = "assets/prefabs/ui/chapter/%s.prefab" local CHAPTER_PATH = "assets/prefabs/ui/chapter/%s.prefab"
local CHAPTER_PAGE = 5 local CHAPTER_PAGE = 5
@ -216,7 +216,7 @@ function MainComp:refreshChapterBg()
self.chapterScenes[self.currScenePath]:setActive(false) self.chapterScenes[self.currScenePath]:setActive(false)
end end
self.currScenePath = bgPath self.currScenePath = bgPath
self.chapterBg:setSprite(GConst.ATLAS_PATH.UI_CHAPTER, scene) self.chapterBg:setTexture(string.format(CHAPTER_BG_PATH, scene))
else else
self.isLoading = true self.isLoading = true
local oldPath = self.currScenePath local oldPath = self.currScenePath
@ -227,7 +227,7 @@ function MainComp:refreshChapterBg()
end end
self.currScenePath = bgPath self.currScenePath = bgPath
self.chapterScenes[self.currScenePath] = prefab 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 end
end end