显示修改
This commit is contained in:
parent
bbcf5c20ea
commit
c1ed407a0f
@ -147,7 +147,7 @@ function BattleController:onLinkChange()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.battleUI:refreshSkill(elementTypeMap)
|
self.battleUI:refreshSkill(elementTypeMap, true)
|
||||||
if mainElementType then
|
if mainElementType then
|
||||||
self.atkTeam:changeMainUnit(mainElementType)
|
self.atkTeam:changeMainUnit(mainElementType)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -532,7 +532,7 @@ function BattleUI:refreshDefHp(num, percent)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUI:refreshSkill(elementMap)
|
function BattleUI:refreshSkill(elementMap, showSfx)
|
||||||
if not self.skillNodeCells then
|
if not self.skillNodeCells then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -541,7 +541,7 @@ function BattleUI:refreshSkill(elementMap)
|
|||||||
if not self.skillNodeCells[elementType] then
|
if not self.skillNodeCells[elementType] then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.skillNodeCells[elementType]:refresh(skillEntity, elementMap)
|
self.skillNodeCells[elementType]:refresh(skillEntity, elementMap, showSfx)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -737,9 +737,12 @@ function BattleUI:eliminationAni(sequence, callback)
|
|||||||
if entity and entity:getCell() then
|
if entity and entity:getCell() then
|
||||||
local baseObject = entity:getCell():getBaseObject()
|
local baseObject = entity:getCell():getBaseObject()
|
||||||
baseObject:getTransform():SetAsLastSibling()
|
baseObject:getTransform():SetAsLastSibling()
|
||||||
if entity:getSkillId() or info.noAni then
|
if info.noAni then
|
||||||
baseObject:setAnchoredPositionX(DEFAULT_X)
|
baseObject:setAnchoredPositionX(DEFAULT_X)
|
||||||
else
|
else
|
||||||
|
if entity:getSkillId() then
|
||||||
|
entity:getCell():hideSkillSfx()
|
||||||
|
end
|
||||||
self.eliminationAniSeq:Insert(index * 0.01, baseObject:getTransform():DOScale(1.3, 0.1))
|
self.eliminationAniSeq:Insert(index * 0.01, baseObject:getTransform():DOScale(1.3, 0.1))
|
||||||
self.eliminationAniSeq:InsertCallback(index * 0.01 + 0.2, function()
|
self.eliminationAniSeq:InsertCallback(index * 0.01 + 0.2, function()
|
||||||
self:getSfxSmoke(index, function(obj)
|
self:getSfxSmoke(index, function(obj)
|
||||||
|
|||||||
@ -156,6 +156,12 @@ function GridCell:showHighLight(show, mainElementType)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function GridCell:hideSkillSfx()
|
||||||
|
if self.outLineSfxObjs and self.outLineSfxObjs.skill then
|
||||||
|
self.outLineSfxObjs.skill:setActive(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function GridCell:resetTranform()
|
function GridCell:resetTranform()
|
||||||
local uiMap = self:getUIMap()
|
local uiMap = self:getUIMap()
|
||||||
self.baseObject:setLocalScale(1, 1, 1)
|
self.baseObject:setLocalScale(1, 1, 1)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
local SkillNodeCell = class("SkillNodeCell", BaseCell)
|
local SkillNodeCell = class("SkillNodeCell", BaseCell)
|
||||||
|
|
||||||
function SkillNodeCell:refresh(skillEntity, elementMap)
|
function SkillNodeCell:refresh(skillEntity, elementMap, showSfx)
|
||||||
local elementType = skillEntity:getPosition()
|
local elementType = skillEntity:getPosition()
|
||||||
local add = 0
|
local add = 0
|
||||||
if elementMap and elementMap[elementType] then
|
if elementMap and elementMap[elementType] then
|
||||||
@ -36,13 +36,19 @@ function SkillNodeCell:refresh(skillEntity, elementMap)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local effect = uiMap["skill_node_cell.icon_node.vfx_ui_battle_skill_full_b01"]
|
local effect = uiMap["skill_node_cell.icon_node.vfx_ui_battle_skill_full_b01"]
|
||||||
if value >= 1 then
|
if not self.lastValue then
|
||||||
|
self.lastValue = 0
|
||||||
|
end
|
||||||
|
if add > 0 and value == 1 and showSfx and self.lastValue < value then
|
||||||
effect:setVisible(true)
|
effect:setVisible(true)
|
||||||
effect:stopAndClear()
|
effect:stopAndClear()
|
||||||
effect:play()
|
effect:play()
|
||||||
else
|
else
|
||||||
|
if not showSfx then
|
||||||
effect:setVisible(false)
|
effect:setVisible(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
self.lastValue = value
|
||||||
|
end
|
||||||
|
|
||||||
return SkillNodeCell
|
return SkillNodeCell
|
||||||
Loading…
x
Reference in New Issue
Block a user