Merge branch 'dev_20230815' of http://git.juzugame.com/b6-client/b6-lua into dev_20230815

This commit is contained in:
xiekaidong 2023-08-11 17:50:19 +08:00
commit 5cfb937723
4 changed files with 86 additions and 3 deletions

View File

@ -22,9 +22,7 @@ function ActivityHeroComp:init()
end end
function ActivityHeroComp:refresh() function ActivityHeroComp:refresh()
self.spineBanner:playAnimComplete("born", false, true, function() self.spineBanner:playAnim("animation", true, true)
self.spineBanner:playAnim("idle", true, true)
end)
self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_8)) self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_8))
local gift = DataManager.ShopData:getActGiftConfig()[GConst.ActivityConst.HERO_GIFT_ID_1] local gift = DataManager.ShopData:getActGiftConfig()[GConst.ActivityConst.HERO_GIFT_ID_1]

View File

@ -317,6 +317,7 @@ function BattleResultUI:refreshArenaBoxNode()
self.arenaBoxImgIcon:setSprite(GConst.ATLAS_PATH.SHOP, "shop_chest_4") self.arenaBoxImgIcon:setSprite(GConst.ATLAS_PATH.SHOP, "shop_chest_4")
self.arenaBoxTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_34)) self.arenaBoxTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_34))
end end
ModuleManager.ArenaManager:markAdBox(self.isWin)
end end
function BattleResultUI:refreshArenaGradingSpine(gradingId, isUp) function BattleResultUI:refreshArenaGradingSpine(gradingId, isUp)

View File

@ -1,6 +1,7 @@
local DungeonArmorMainUI = class("DungeonArmorMainUI", BaseUI) local DungeonArmorMainUI = class("DungeonArmorMainUI", BaseUI)
local CHAPTER_LAYER_CELL = "app/ui/dungeon_armor/cell/chapter_cell" local CHAPTER_LAYER_CELL = "app/ui/dungeon_armor/cell/chapter_cell"
local GIFT_CELL = "app/ui/main_city/cell/side_bar_armor_gift_cell"
function DungeonArmorMainUI:getCurrencyParams() function DungeonArmorMainUI:getCurrencyParams()
if self.currencyParams == nil then if self.currencyParams == nil then
@ -48,6 +49,11 @@ function DungeonArmorMainUI:onLoadRootComplete()
self:_addListeners() self:_addListeners()
self:_bind() self:_bind()
DataManager.ShopData:checkPopGift(PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT) DataManager.ShopData:checkPopGift(PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT)
self:refreshTime()
self:scheduleGlobal(function()
self:refreshTime()
end, 1)
end end
function DungeonArmorMainUI:_display() function DungeonArmorMainUI:_display()
@ -63,6 +69,7 @@ function DungeonArmorMainUI:_display()
self.btnFund:setActive(not GFunc.isShenhe()) self.btnFund:setActive(not GFunc.isShenhe())
self:refreshFund() self:refreshFund()
self:initRightBtns()
self:refreshScrollrect() self:refreshScrollrect()
self:refreshFormation() self:refreshFormation()
self:refreshStarNode() self:refreshStarNode()
@ -284,4 +291,39 @@ function DungeonArmorMainUI:refreshFund()
end end
end end
function DungeonArmorMainUI:refreshTime()
self:refreshRightBtns()
end
function DungeonArmorMainUI:initRightBtns()
if self.rightBtnCells then
return
end
local uiMap = self.root:genAllChildren()
self.rightNode = uiMap["dungeon_armor_main_ui.right_node"]
self.rightArrow = uiMap["dungeon_armor_main_ui.right_node.arrow_node"]
self.rightBtnCells = {}
self.rightBtnCells.giftCell = CellManager:addCellComp(uiMap["dungeon_armor_main_ui.right_node.side_bar.side_bar_cell"], GIFT_CELL)
self.rightArrow:setVisible(false)
self:refreshRightBtns()
end
function DungeonArmorMainUI:refreshRightBtns()
local y = 0
if self.rightBtnCells.giftCell:checkIsOpen() then
y = y - 60
self.rightBtnCells.giftCell:setActive(true)
self.rightBtnCells.giftCell:setVisible(true)
self.rightBtnCells.giftCell:getBaseObject():setAnchoredPositionY(y)
self.rightBtnCells.giftCell:refresh()
else
self.rightBtnCells.giftCell:setVisible(false)
end
-- 暂不处理箭头的问题
self.rightNode:setVisible(y < 0)
end
return DungeonArmorMainUI return DungeonArmorMainUI

View File

@ -1,6 +1,7 @@
local DungeonWeaponMainUI = class("DungeonWeaponMainUI", BaseUI) local DungeonWeaponMainUI = class("DungeonWeaponMainUI", BaseUI)
local CHAPTER_LAYER_CELL = "app/ui/dungeon_weapon/cell/chapter_layer_cell" local CHAPTER_LAYER_CELL = "app/ui/dungeon_weapon/cell/chapter_layer_cell"
local GIFT_CELL = "app/ui/main_city/cell/side_bar_weapon_gift_cell"
function DungeonWeaponMainUI:getCurrencyParams() function DungeonWeaponMainUI:getCurrencyParams()
if self.currencyParams == nil then if self.currencyParams == nil then
@ -40,12 +41,18 @@ function DungeonWeaponMainUI:onLoadRootComplete()
self:_addListeners() self:_addListeners()
self:_bind() self:_bind()
DataManager.ShopData:checkPopGift(PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT) DataManager.ShopData:checkPopGift(PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT)
self:refreshTime()
self:scheduleGlobal(function()
self:refreshTime()
end, 1)
end end
function DungeonWeaponMainUI:_display() function DungeonWeaponMainUI:_display()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
uiMap["dungeon_weapon_mian_ui.banner.btn_formation.tx_ok"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_4)) uiMap["dungeon_weapon_mian_ui.banner.btn_formation.tx_ok"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_4))
self:initRightBtns()
self:refreshScrollrect() self:refreshScrollrect()
self:refreshFormation() self:refreshFormation()
self:refreshRemianNode() self:refreshRemianNode()
@ -115,4 +122,39 @@ function DungeonWeaponMainUI:refreshRemianNode()
GFunc.expandImgToFitTx(node, txt, 16.5) GFunc.expandImgToFitTx(node, txt, 16.5)
end end
function DungeonWeaponMainUI:refreshTime()
self:refreshRightBtns()
end
function DungeonWeaponMainUI:initRightBtns()
if self.rightBtnCells then
return
end
local uiMap = self.root:genAllChildren()
self.rightNode = uiMap["dungeon_weapon_mian_ui.right_node"]
self.rightArrow = uiMap["dungeon_weapon_mian_ui.right_node.arrow_node"]
self.rightBtnCells = {}
self.rightBtnCells.giftCell = CellManager:addCellComp(uiMap["dungeon_weapon_mian_ui.right_node.side_bar.side_bar_cell"], GIFT_CELL)
self.rightArrow:setVisible(false)
self:refreshRightBtns()
end
function DungeonWeaponMainUI:refreshRightBtns()
local y = 0
if self.rightBtnCells.giftCell:checkIsOpen() then
y = y - 60
self.rightBtnCells.giftCell:setActive(true)
self.rightBtnCells.giftCell:setVisible(true)
self.rightBtnCells.giftCell:getBaseObject():setAnchoredPositionY(y)
self.rightBtnCells.giftCell:refresh()
else
self.rightBtnCells.giftCell:setVisible(false)
end
-- 暂不处理箭头的问题
self.rightNode:setVisible(y < 0)
end
return DungeonWeaponMainUI return DungeonWeaponMainUI