成就可以领的时候的处理

This commit is contained in:
chenxi 2023-06-01 11:57:21 +08:00
parent bd805dfa9a
commit fd8151dfa6

View File

@ -581,6 +581,7 @@ function MainCityUI:initBounty()
self.bountyBanner:addClickListener(function()
ModuleManager.BountyManager:showBountyMainUI()
end)
self.bountyRewardSpine = self.uiMap["main_ui.top_node.bounty_node.banner.spine"]
self.bountyBannerInfo = self.uiMap["main_ui.top_node.bounty_node.banner.info"]
self.bountyBannerDescTx = self.uiMap["main_ui.top_node.bounty_node.banner.desc"]
self.bountyBannerSlider = self.uiMap["main_ui.top_node.bounty_node.banner.info.progress_bg.slider"]
@ -613,11 +614,14 @@ function MainCityUI:refreshBounty()
end
self.bountyNode:setVisible(true)
if DataManager.BountyData:getIfCanClaimReward() then
local bannerName = DataManager.BountyData:getRewardBannerName()
self.bountyBanner:setSprite(GConst.ATLAS_PATH.BOUNTY, bannerName)
self.bountyRewardSpine:setVisible(true)
self.bountyRewardSpine:playAnim("idle", true)
self.bountyRewardSpine:getSkeletonGraphic().enabled = true
self.bountyBannerInfo:setVisible(false)
self.bountyBannerDescTx:setText(I18N:getGlobalText(I18N.GlobalConst.COLLET_REWARDS))
else
self.bountyRewardSpine:setVisible(false)
self.bountyRewardSpine:getSkeletonGraphic().enabled = false
local bannerName = DataManager.BountyData:getBannerName()
self.bountyBanner:setSprite(GConst.ATLAS_PATH.BOUNTY, bannerName)
self.bountyBannerInfo:setVisible(true)