局内颜色特效
This commit is contained in:
parent
1dcc3dcd69
commit
15f5bdca59
@ -1012,7 +1012,7 @@ BattleConst.OUTLINE_SFX = {
|
|||||||
BattleConst.SKILL_LIGHT_POINT_SFX = "assets/prefabs/effects/battle/sfx_skill_b05.prefab"
|
BattleConst.SKILL_LIGHT_POINT_SFX = "assets/prefabs/effects/battle/sfx_skill_b05.prefab"
|
||||||
BattleConst.SKILL_LIGHT_LINE_SFX = "assets/prefabs/effects/battle/sfx_skill_b04.prefab"
|
BattleConst.SKILL_LIGHT_LINE_SFX = "assets/prefabs/effects/battle/sfx_skill_b04.prefab"
|
||||||
BattleConst.LINE_SFX = "assets/prefabs/effects/battle/sfx_c1_ui_line_b0%s.prefab"
|
BattleConst.LINE_SFX = "assets/prefabs/effects/battle/sfx_c1_ui_line_b0%s.prefab"
|
||||||
BattleConst.CHANGE_ELEMENT_SFX = "assets/prefabs/effects/battle/sfx_skill_b02.prefab"
|
BattleConst.CHANGE_ELEMENT_SFX = "assets/prefabs/effects/battle/sfx_c1_ui_qizi_color_b0%s.prefab"
|
||||||
BattleConst.LINK_SMOKE = "assets/prefabs/effects/battle/sfx_piece_smoke_b0%s.prefab"
|
BattleConst.LINK_SMOKE = "assets/prefabs/effects/battle/sfx_piece_smoke_b0%s.prefab"
|
||||||
BattleConst.GRID_KILL_SFX = {
|
BattleConst.GRID_KILL_SFX = {
|
||||||
[BattleConst.ELEMENT_TYPE.RED] = "assets/prefabs/effects/battle/sfx_piece_qizi_posui_b04.prefab",
|
[BattleConst.ELEMENT_TYPE.RED] = "assets/prefabs/effects/battle/sfx_piece_qizi_posui_b04.prefab",
|
||||||
|
|||||||
@ -2469,7 +2469,7 @@ function BattleBaseController:changeElementTypeByMap(changeMap)
|
|||||||
local index = 1
|
local index = 1
|
||||||
for entity, elementType in pairs(changeMap) do
|
for entity, elementType in pairs(changeMap) do
|
||||||
self.battleData:setGridInfo(entity:getPosId(), {gridType = entity:getGridType(), elementType = elementType})
|
self.battleData:setGridInfo(entity:getPosId(), {gridType = entity:getGridType(), elementType = elementType})
|
||||||
self.battleUI:playChangeElementSfx(entity:getPosId(), index)
|
self.battleUI:playChangeElementSfx(elementType, entity:getPosId(), index)
|
||||||
index = index + 1
|
index = index + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -2598,7 +2598,7 @@ function BattleBaseController:shuffleBoard(callback)
|
|||||||
local count = 1
|
local count = 1
|
||||||
for posId, info in pairs(resetInfo) do
|
for posId, info in pairs(resetInfo) do
|
||||||
self.battleData:setInfoBySnapshop(posId, info)
|
self.battleData:setInfoBySnapshop(posId, info)
|
||||||
self.battleUI:playChangeElementSfx(posId, count)
|
self.battleUI:playChangeElementSfx(info.elementType, posId, count)
|
||||||
count = count + 1
|
count = count + 1
|
||||||
end
|
end
|
||||||
self.resetGridSid = nil
|
self.resetGridSid = nil
|
||||||
|
|||||||
@ -224,7 +224,8 @@ function BattleControllerPVP:onFillBoardOver(...)
|
|||||||
local skillEntity = self.battleData:getSkillEntityByElement(skillMatchType, self.curActionSide)
|
local skillEntity = self.battleData:getSkillEntityByElement(skillMatchType, self.curActionSide)
|
||||||
if skillEntity then
|
if skillEntity then
|
||||||
entity:setSkilId(skillEntity:getSkillId(), false, self.curActionSide)
|
entity:setSkilId(skillEntity:getSkillId(), false, self.curActionSide)
|
||||||
self.battleUI:playChangeElementSfx(posId, index)
|
--@ TODO 2025-08-28 20:45:55 先写死
|
||||||
|
self.battleUI:playChangeElementSfx(1, posId, index)
|
||||||
index = index + 1
|
index = index + 1
|
||||||
if unitComp.unitEntity then
|
if unitComp.unitEntity then
|
||||||
if unitComp.unitEntity:getActiveSkillLimit() then
|
if unitComp.unitEntity:getActiveSkillLimit() then
|
||||||
|
|||||||
@ -756,13 +756,11 @@ function BattleBaseUI:playSkillLightSfxs(tartgetPos, pos, index, isPoint)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBaseUI:playChangeElementSfx(posId, index)
|
function BattleBaseUI:playChangeElementSfx(elementType, posId, index)
|
||||||
if not self.root.changeElementSfxs then
|
self.root.changeElementSfxs = self.root.changeElementSfxs or {}
|
||||||
self.root.changeElementSfxs = {}
|
self.root.changeElementSfxs[elementType] = self.root.changeElementSfxs[elementType] or {}
|
||||||
end
|
|
||||||
|
|
||||||
local pos = self:getPosInfo(posId)
|
local pos = self:getPosInfo(posId)
|
||||||
local info = self.root.changeElementSfxs[index]
|
local info = self.root.changeElementSfxs[elementType][index]
|
||||||
if info then
|
if info then
|
||||||
local obj = info.obj
|
local obj = info.obj
|
||||||
if obj then
|
if obj then
|
||||||
@ -771,11 +769,12 @@ function BattleBaseUI:playChangeElementSfx(posId, index)
|
|||||||
obj:play()
|
obj:play()
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.root.changeElementSfxs[index] = {
|
self.root.changeElementSfxs[elementType][index] = {
|
||||||
isLoaded = true
|
isLoaded = true
|
||||||
}
|
}
|
||||||
EffectManager:loadUIEffectAsync(GConst.BattleConst.CHANGE_ELEMENT_SFX, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
local path = string.format(GConst.BattleConst.CHANGE_ELEMENT_SFX, elementType)
|
||||||
self.root.changeElementSfxs[index].obj = obj
|
EffectManager:loadUIEffectAsync(path, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
||||||
|
self.root.changeElementSfxs[elementType][index].obj = obj
|
||||||
obj:setAnchoredPosition(pos.x, pos.y)
|
obj:setAnchoredPosition(pos.x, pos.y)
|
||||||
obj:play()
|
obj:play()
|
||||||
end)
|
end)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user