fix bug
This commit is contained in:
parent
1394f8630d
commit
6e0ba88406
@ -660,6 +660,7 @@ BattleConst.SKILL_ELEMENT_BG = {
|
||||
}
|
||||
|
||||
BattleConst.SKILL_ELEMENT_BG_2 = {
|
||||
universal = "battle_skill_colorful_2",
|
||||
skill = "battle_skill_colorful",
|
||||
[BattleConst.ELEMENT_TYPE.RED] = "battle_skill_bg_red_2",
|
||||
[BattleConst.ELEMENT_TYPE.YELLOW] = "battle_skill_bg_yellow_2",
|
||||
|
||||
@ -169,11 +169,12 @@ function GridCell:showHighLight(show, mainElementType)
|
||||
local isUniversal = self.gridEntity:getIsUniversal()
|
||||
if skillId then
|
||||
downBg:setVisible(true)
|
||||
show = true -- 有技能,强制显示特效
|
||||
local skillEntity = self:getSkillEntity()
|
||||
local ignoreElementType = skillEntity:getIgnoreElementType()
|
||||
local skillBg
|
||||
if ignoreElementType and not mainElementType then
|
||||
if show and not mainElementType then
|
||||
skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2.universal
|
||||
elseif ignoreElementType and not mainElementType then
|
||||
skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2.skill
|
||||
else
|
||||
mainElementType = mainElementType or skillEntity:getPosition()
|
||||
@ -183,6 +184,7 @@ function GridCell:showHighLight(show, mainElementType)
|
||||
self.lastSkillBg = skillBg
|
||||
downBg:setSprite(GConst.ATLAS_PATH.BATTLE, self.lastSkillBg)
|
||||
end
|
||||
show = true -- 有技能,强制显示特效
|
||||
elseif isUniversal then
|
||||
downBg:setVisible(true)
|
||||
downBg:setSprite(GConst.ATLAS_PATH.BATTLE, "battle_bg_lv")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user