界面处理
This commit is contained in:
parent
0a7cb2a5b9
commit
073b4cceab
@ -34,15 +34,22 @@ function GridCell:refresh(gridEntity, curElement)
|
|||||||
elementIcon:setVisible(false)
|
elementIcon:setVisible(false)
|
||||||
skillIcon:setVisible(true)
|
skillIcon:setVisible(true)
|
||||||
|
|
||||||
if self.lastSkillId ~= skillId then
|
local sprite
|
||||||
self.lastSkillId = skillId
|
local skillEntity = DataManager.BattleData:getSkillEntityBySkillId(skillId)
|
||||||
|
if skillEntity then
|
||||||
|
sprite = skillEntity:getBattleIcon()
|
||||||
|
else
|
||||||
local cfg = ModuleManager.BattleManager.SKILL_CFG[skillId]
|
local cfg = ModuleManager.BattleManager.SKILL_CFG[skillId]
|
||||||
if cfg then
|
if cfg then
|
||||||
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL, tostring(cfg.battle_icon))
|
sprite = tostring(cfg.battle_icon)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local skillEntity = DataManager.BattleData:getSkillEntityBySkillId(gridEntity:getSkillId())
|
if sprite and self.lastSkillSprite ~= sprite then
|
||||||
|
self.lastSkillSprite = sprite
|
||||||
|
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL, self.lastSkillSprite)
|
||||||
|
end
|
||||||
|
|
||||||
elementType = gridEntity:getElementType(skillEntity)
|
elementType = gridEntity:getElementType(skillEntity)
|
||||||
if not elementType then
|
if not elementType then
|
||||||
showMask = false
|
showMask = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user