场景3 4
This commit is contained in:
parent
15f5bdca59
commit
6e938240d7
@ -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",
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user