fix bug
This commit is contained in:
parent
159a3d1a15
commit
1a3f85d55b
@ -488,12 +488,18 @@ function BattleUI:refreshWave(wave, iconAtlas, iconName, maxWave)
|
|||||||
local uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
local icon = uiMap["battle_ui.top_node.wave_icon"]
|
local icon = uiMap["battle_ui.top_node.wave_icon"]
|
||||||
local desc = uiMap["battle_ui.top_node.wave_desc"]
|
local desc = uiMap["battle_ui.top_node.wave_desc"]
|
||||||
desc:setText(wave .. "/" .. (maxWave or wave))
|
if not maxWave then
|
||||||
|
desc:setText(wave)
|
||||||
|
else
|
||||||
|
desc:setText(wave .. "/" .. maxWave)
|
||||||
|
end
|
||||||
GFunc.centerImgAndTx(icon, desc, 10)
|
GFunc.centerImgAndTx(icon, desc, 10)
|
||||||
|
|
||||||
iconAtlas = iconAtlas or GConst.ATLAS_PATH.BATTLE
|
iconAtlas = iconAtlas or GConst.ATLAS_PATH.BATTLE
|
||||||
iconName = iconName or "battle_dec_1"
|
iconName = iconName or "battle_dec_1"
|
||||||
icon:setSprite(iconAtlas, iconName)
|
icon:setSprite(iconAtlas, iconName, function ()
|
||||||
|
icon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUI:refreshTaskBtn()
|
function BattleUI:refreshTaskBtn()
|
||||||
|
|||||||
@ -378,6 +378,9 @@ function HeroDetailUI:refreshPageInfo()
|
|||||||
self:showEquipInfo()
|
self:showEquipInfo()
|
||||||
end
|
end
|
||||||
self:refreshPageBtn()
|
self:refreshPageBtn()
|
||||||
|
|
||||||
|
local power = self.heroEntity:getPower()
|
||||||
|
self.powerTx:setText(GFunc.num2Str2(power, 2))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 刷新标签红点
|
-- 刷新标签红点
|
||||||
@ -410,8 +413,6 @@ function HeroDetailUI:showHeroInfo()
|
|||||||
self.skillNode:setActive(true)
|
self.skillNode:setActive(true)
|
||||||
self.attrNode:setAnchoredPositionY(-709)
|
self.attrNode:setAnchoredPositionY(-709)
|
||||||
|
|
||||||
local power = self.heroEntity:getPower()
|
|
||||||
self.powerTx:setText(GFunc.num2Str2(power, 2))
|
|
||||||
if not self.compHero then
|
if not self.compHero then
|
||||||
self.heroInfo:initPrefabHelper()
|
self.heroInfo:initPrefabHelper()
|
||||||
self.heroInfo:genAllChildren()
|
self.heroInfo:genAllChildren()
|
||||||
|
|||||||
@ -213,7 +213,7 @@ function ShopComp:updateGoldCell(offsetY)
|
|||||||
self.beginPosY = math.abs(offsetY)
|
self.beginPosY = math.abs(offsetY)
|
||||||
end
|
end
|
||||||
if self.rpPosY == nil then
|
if self.rpPosY == nil then
|
||||||
self.rpPosY = DataManager.ShopData:hasGoldRedPoint() and math.abs(offsetY) or nil
|
self.rpPosY = DataManager.ShopData:hasGoldRedPoint(true) and math.abs(offsetY) or nil
|
||||||
end
|
end
|
||||||
|
|
||||||
self.goldTitleBg:setAnchoredPositionY(offsetY)
|
self.goldTitleBg:setAnchoredPositionY(offsetY)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user