修改主界面
This commit is contained in:
parent
d88f15e72f
commit
188ff47265
@ -624,5 +624,6 @@ BattleConst.GRID_TYPE_BREAK_SFX = {
|
|||||||
[BattleConst.GRID_TYPE.VINES] = "assets/prefabs/effects/battle/sfx_piece_za_b03.prefab",
|
[BattleConst.GRID_TYPE.VINES] = "assets/prefabs/effects/battle/sfx_piece_za_b03.prefab",
|
||||||
[BattleConst.GRID_TYPE.ICE] = "assets/prefabs/effects/battle/sfx_piece_za_b02.prefab",
|
[BattleConst.GRID_TYPE.ICE] = "assets/prefabs/effects/battle/sfx_piece_za_b02.prefab",
|
||||||
}
|
}
|
||||||
|
BattleConst.LINK_SMOKE = "assets/prefabs/effects/battle/sfx_piece_smoke_b01.prefab"
|
||||||
|
|
||||||
return BattleConst
|
return BattleConst
|
||||||
@ -727,6 +727,9 @@ function BattleUI:eliminationAni(sequence, callback)
|
|||||||
|
|
||||||
for index, info in ipairs(sequence) do
|
for index, info in ipairs(sequence) do
|
||||||
if not self.posIdMap[info.posId] then
|
if not self.posIdMap[info.posId] then
|
||||||
|
self:getSfxSmoke(index, function(obj)
|
||||||
|
obj:play()
|
||||||
|
end)
|
||||||
self.posIdMap[info.posId] = true
|
self.posIdMap[info.posId] = true
|
||||||
local entity = DataManager.BattleData:getGridEntity(info.posId)
|
local entity = DataManager.BattleData:getGridEntity(info.posId)
|
||||||
|
|
||||||
@ -1223,6 +1226,47 @@ function BattleUI:hideAllSfxGridBreak()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleUI:getSfxSmoke(index, func)
|
||||||
|
self.hidingAllSfxSmoke = false
|
||||||
|
|
||||||
|
if not self.root.smokeSfxObjs then
|
||||||
|
self.root.smokeSfxObjs = {}
|
||||||
|
end
|
||||||
|
if self.root.smokeSfxObjs[index] then
|
||||||
|
if self.root.smokeSfxObjs[index].obj and func then
|
||||||
|
local obj = self.root.smokeSfxObjs[index].obj
|
||||||
|
obj:setActive(true)
|
||||||
|
func(obj)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self.root.smokeSfxObjs[index] = {
|
||||||
|
isLoaded = true
|
||||||
|
}
|
||||||
|
EffectManager:loadUIEffectAsync(GConst.BattleConst.LINK_SMOKE, self, self.gridNode, 11, function(obj)
|
||||||
|
self.root.smokeSfxObjs[index].obj = obj
|
||||||
|
if self.hidingAllSfxLine then
|
||||||
|
obj:setActive(false)
|
||||||
|
else
|
||||||
|
if func then
|
||||||
|
func(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleUI:hideAllSfxSmoke()
|
||||||
|
self.hidingAllSfxSmoke = true
|
||||||
|
if not self.root.smokeSfxObjs then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for inde, info in pairs(self.root.smokeSfxObjs) do
|
||||||
|
if info.obj then
|
||||||
|
info.obj:setActive(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function BattleUI:initTutorialNode()
|
function BattleUI:initTutorialNode()
|
||||||
local uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
self.tutorialNode = uiMap["battle_ui.tutorial_node"]
|
self.tutorialNode = uiMap["battle_ui.tutorial_node"]
|
||||||
|
|||||||
@ -171,9 +171,13 @@ function MainCityUI:initBottomUI()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if self.selectedIndex == 2 then
|
if self.selectedIndex == 2 then
|
||||||
uiMap["main_ui.bottom_node.icons.ui_spine_obj_l"]:playAnim("born", false, false)
|
uiMap["main_ui.bottom_node.icons.ui_spine_obj_l"]:playAnimComplete("born", false, false, function()
|
||||||
|
uiMap["main_ui.bottom_node.icons.ui_spine_obj_l"]:playAnim("idle", false, false)
|
||||||
|
end)
|
||||||
else
|
else
|
||||||
uiMap["main_ui.bottom_node.icons.ui_spine_obj_r"]:playAnim("born", false, false)
|
uiMap["main_ui.bottom_node.icons.ui_spine_obj_r"]:playAnimComplete("born", false, false, function()
|
||||||
|
uiMap["main_ui.bottom_node.icons.ui_spine_obj_r"]:playAnim("idle", false, false)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
self:refreshBottom(i, true)
|
self:refreshBottom(i, true)
|
||||||
end)
|
end)
|
||||||
@ -185,11 +189,8 @@ function MainCityUI:initBottomUI()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- uiMap["main_ui.bottom_node.icons.ui_spine_obj_l"]:playAnim("born", false, false)
|
uiMap["main_ui.bottom_node.icons.ui_spine_obj_l"]:playAnim("idle", false, false)
|
||||||
uiMap["main_ui.bottom_node.icons.ui_spine_obj_l"]:setTimeScale(0.3)
|
uiMap["main_ui.bottom_node.icons.ui_spine_obj_r"]:playAnim("idle", false, false)
|
||||||
|
|
||||||
-- uiMap["main_ui.bottom_node.icons.ui_spine_obj_r"]:playAnim("born", false, false)
|
|
||||||
uiMap["main_ui.bottom_node.icons.ui_spine_obj_r"]:setTimeScale(0.3)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainCityUI:initComp()
|
function MainCityUI:initComp()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user