fix bug
This commit is contained in:
parent
83f60be443
commit
69d1c1ff10
@ -34,7 +34,7 @@ function SummonBallCell:refresh(wishHeroId, heroId, callback, select)
|
||||
|
||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SUMMON, tostring(cfg.icon))
|
||||
self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_SUMMON, "summon_card_" .. cfg.qlt)
|
||||
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_SUMMON, "summon_card_mark_" .. cfg.qlt)
|
||||
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, "summon_card_mark_" .. cfg.qlt)
|
||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
||||
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
||||
|
||||
@ -71,7 +71,7 @@ function SummonBallCell:refreshInfo(heroId)
|
||||
local cfg = DataManager.HeroData:getHeroConfig(heroId)
|
||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SUMMON, tostring(cfg.icon))
|
||||
self.heroBg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. cfg.qlt)
|
||||
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[cfg.qlt])
|
||||
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, "summon_card_mark_" .. cfg.qlt)
|
||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
||||
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
||||
|
||||
|
||||
@ -9,14 +9,18 @@ function SummonRewardCell:init()
|
||||
self.txCount = uiMap["summon_reward_cell.bg1.tx_count"]
|
||||
self.bg = uiMap["summon_reward_cell.bg"]
|
||||
self.bg1 = uiMap["summon_reward_cell.bg1"]
|
||||
self.matchImg = uiMap["summon_reward_cell.bg1.match_img"]
|
||||
self.heroDec = uiMap["summon_reward_cell.bg1.dec"]
|
||||
self.effectQlts = {}
|
||||
self.effectQlts[3] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_lan_b01"]
|
||||
self.effectQlts[4] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_zi_b01"]
|
||||
self.effectQlts[5] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_cheng_b01"]
|
||||
end
|
||||
|
||||
function SummonRewardCell:getEffectQlts()
|
||||
return self.effectQlts
|
||||
end
|
||||
|
||||
function SummonRewardCell:refresh(reward, index, parentUI)
|
||||
self.patentUI = parentUI
|
||||
if self.effectQlts[5] then
|
||||
@ -32,6 +36,8 @@ function SummonRewardCell:refresh(reward, index, parentUI)
|
||||
self.imgIcon:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, tostring(cfg.icon))
|
||||
self.bg:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, "summon_card_b_" .. cfg.qlt)
|
||||
self.bg1:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. cfg.qlt)
|
||||
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, "summon_card_mark_" .. cfg.qlt)
|
||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
||||
self.txName:setText(ModuleManager.HeroManager:getHeroName(reward.item.id))
|
||||
-- self.txCount:setText("x" .. reward.item.count)
|
||||
self:getBaseObject():setActive(true)
|
||||
@ -40,6 +46,7 @@ function SummonRewardCell:refresh(reward, index, parentUI)
|
||||
self:playEffect(cfg.qlt)
|
||||
end, 0.3)
|
||||
end
|
||||
|
||||
function SummonRewardCell:playEffect(qlt)
|
||||
if qlt == 6 and self.effectQlts[6] == nil then
|
||||
local tranInfo = self.imgIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.TRANSFORM).parent
|
||||
@ -47,7 +54,7 @@ function SummonRewardCell:playEffect(qlt)
|
||||
local infoBase = UIPrefabObject:create()
|
||||
infoBase:initWithPrefab(GConst.EMPTY_STRING, tranInfo)
|
||||
infoBase:initPrefabHelper()
|
||||
EffectManager:loadUIEffectAsync("assets/prefabs/effects/ui/vfx_b13_chouka_hong_b01.prefab", self.patentUI, infoBase, 0,
|
||||
EffectManager:loadUIEffectAsync("assets/prefabs/effects/ui/vfx_b13_chouka_hong_b01.prefab", self.patentUI, infoBase, 0,
|
||||
function(obj)
|
||||
if self.effectQlts[6] then
|
||||
self.effectQlts[6]:destroy()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user