抽卡界面不展示装备升级红点

This commit is contained in:
Fang 2023-07-28 12:05:32 +08:00
parent 145eb15803
commit d89238a763
2 changed files with 9 additions and 1 deletions

View File

@ -99,13 +99,20 @@ function HeroCell:refreshRedPoint()
return
end
if DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) and DataManager.EquipData:canUpgradeEquip(self.heroEntity:getCfgId()) then
if not self.notShowRedPoint and
DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) and
DataManager.EquipData:canUpgradeEquip(self.heroEntity:getCfgId()) then
self.selfNode:addRedPoint(55, -35, 0.64)
else
self.selfNode:removeRedPoint()
end
end
-- 设置是否展示红点
function HeroCell:setShowRedPoint(show)
self.notShowRedPoint = not show
end
function HeroCell:getHeroId()
if not self.heroEntity then
return

View File

@ -15,6 +15,7 @@ function BoxHeroCell:refresh(data)
self.data = data
local id = data.id
local num = data.count
self.heroCell:setShowRedPoint(false)
local heroEntity = DataManager.HeroData:getHeroById(id)
if heroEntity then