技能特效
This commit is contained in:
parent
405aad10f7
commit
4acf0850f8
@ -20,7 +20,8 @@ function SkillNodeCell:refresh(skillEntity, elementMap)
|
||||
end
|
||||
local curEnergy = skillEntity:getEnergy() + add
|
||||
local needEnergy = skillEntity:getNeedEnergy()
|
||||
self.imgComp.fillAmount = curEnergy / needEnergy
|
||||
local value = curEnergy / needEnergy
|
||||
self.imgComp.fillAmount = value
|
||||
if self.lastSkillIcon ~= skillEntity:getBattleIcon() then
|
||||
self.lastSkillIcon = skillEntity:getBattleIcon()
|
||||
uiMap["skill_node_cell.skill_icon"]:setSprite(GConst.ATLAS_PATH.ICON_SKILL, self.lastSkillIcon)
|
||||
@ -33,6 +34,15 @@ function SkillNodeCell:refresh(skillEntity, elementMap)
|
||||
self.lastElementType = elementType
|
||||
uiMap["skill_node_cell.match_bg"]:setSprite(GConst.ATLAS_PATH.BATTLE, GConst.BattleConst.SKILL_ELEMENT_BG[elementType])
|
||||
end
|
||||
|
||||
local effect = uiMap["skill_node_cell.icon_node.vfx_ui_battle_skill_full_b01"]
|
||||
if value >= 1 then
|
||||
effect:setVisible(true)
|
||||
effect:stopAndClear()
|
||||
effect:play()
|
||||
else
|
||||
effect:setVisible(false)
|
||||
end
|
||||
end
|
||||
|
||||
return SkillNodeCell
|
||||
Loading…
x
Reference in New Issue
Block a user