英雄图标
This commit is contained in:
parent
33781e32de
commit
fc16894571
@ -13,6 +13,7 @@ function HeroCell:init()
|
||||
self.unlockTx = uiMap["hero_cell.hero_bg.unlock_tx"]
|
||||
self.lvUpArrow = uiMap["hero_cell.hero_bg.effect_node.ui_spine_obj"]
|
||||
self.fragmenImg = uiMap["hero_cell.hero_bg.progress_bg.fragment_img"]
|
||||
self.sImg = uiMap["hero_cell.hero_bg.s"]
|
||||
self.isGray = false
|
||||
self.baseObject:addClickListener(function()
|
||||
if self.clickCallback then
|
||||
@ -91,6 +92,7 @@ function HeroCell:_refresh(heroInfo, isGray)
|
||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon))
|
||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])
|
||||
self.check:setVisible(false)
|
||||
self.sImg:setVisible(heroInfo.qlt >= 4)
|
||||
self:setGray(isGray)
|
||||
end
|
||||
|
||||
|
||||
@ -4,12 +4,13 @@ local OUT_SCREEN_X = 10000
|
||||
|
||||
function LargeHeroCell:init()
|
||||
local uiMap = self.baseObject:genAllChildren()
|
||||
self.icon = uiMap["hero_cell.hero_bg.icon"]
|
||||
self.heroBg = uiMap["hero_cell.hero_bg"]
|
||||
self.check = uiMap["hero_cell.hero_bg.mask"]
|
||||
self.matchImg = uiMap["hero_cell.hero_bg.match_img"]
|
||||
self.icon = uiMap["large_hero_cell.hero_bg.icon"]
|
||||
self.heroBg = uiMap["large_hero_cell.hero_bg"]
|
||||
self.check = uiMap["large_hero_cell.hero_bg.mask"]
|
||||
self.matchImg = uiMap["large_hero_cell.hero_bg.match_img"]
|
||||
self.infoBtnDesc = uiMap["large_hero_cell.hero_bg.info_btn.desc"]
|
||||
self.useBtnDesc = uiMap["large_hero_cell.hero_bg.use_btn.desc"]
|
||||
self.sImg = uiMap["large_hero_cell.hero_bg.s"]
|
||||
self.isGray = false
|
||||
|
||||
self.useBtnDesc:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_8))
|
||||
@ -61,6 +62,7 @@ function LargeHeroCell:_refresh(heroInfo, isGray)
|
||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon))
|
||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])
|
||||
self.check:setVisible(false)
|
||||
self.sImg:setVisible(heroInfo.qlt >= 4)
|
||||
self:setGray(isGray)
|
||||
end
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ function RewardCell:init()
|
||||
self.numTx = uiMap["reward_cell.item_bg.num"]
|
||||
self.fragment = uiMap["reward_cell.item_bg.fragment"]
|
||||
self.leftUpIcon = uiMap["reward_cell.item_bg.left_up_icon"]
|
||||
self.sImg = uiMap["reward_cell.item_bg.s"]
|
||||
self.frameAni = uiMap["reward_cell.frame_ani"]
|
||||
self:hideFrameAnimation()
|
||||
self.baseObject:addClickListener(function()
|
||||
@ -78,14 +79,17 @@ function RewardCell:_refreshItem(info, count)
|
||||
if heroInfo then
|
||||
self.icon:setLocalScale(0.86, 0.86, 0.86)
|
||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, heroInfo.icon)
|
||||
self.sImg:setVisible(heroInfo.qlt >= 4)
|
||||
else
|
||||
self.icon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha")
|
||||
self.sImg:setVisible(false)
|
||||
end
|
||||
self.fragment:setVisible(true)
|
||||
else
|
||||
self.icon:setLocalScale(1, 1, 1)
|
||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, info.icon)
|
||||
self.fragment:setVisible(false)
|
||||
self.sImg:setVisible(false)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user