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