This commit is contained in:
puxuan 2025-11-05 11:58:40 +08:00
parent 1be90e6308
commit f3dcc3f735
2 changed files with 16 additions and 7 deletions

View File

@ -68,6 +68,8 @@ function ArenaMatchUI:onLoadRootComplete()
self.txLoading = uiMap["arena_match_ui.match_loading.tx_loading"] self.txLoading = uiMap["arena_match_ui.match_loading.tx_loading"]
self.btnCancel = uiMap["arena_match_ui.match_loading.btn_cancel"] self.btnCancel = uiMap["arena_match_ui.match_loading.btn_cancel"]
self.txCancel = uiMap["arena_match_ui.match_loading.btn_cancel.tx_cancel"] self.txCancel = uiMap["arena_match_ui.match_loading.btn_cancel.tx_cancel"]
self.vsVfx = uiMap["arena_match_ui.vfx_c1_ui_vs_01"]
self.vsVfx:setActive(false)
-- 匹配结果页 -- 匹配结果页
self.matchResult = uiMap["arena_match_ui.match_result"] self.matchResult = uiMap["arena_match_ui.match_result"]
@ -144,6 +146,7 @@ function ArenaMatchUI:showMatchLoading()
self.matchSpine:playAnimComplete("born", false, true, function() self.matchSpine:playAnimComplete("born", false, true, function()
self.matchSpine:playAnim("idle", true, true) self.matchSpine:playAnim("idle", true, true)
end) end)
self.vsVfx:setActive(false)
self.txSeason:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_21, DataManager.ArenaData:getSeason())) self.txSeason:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_21, DataManager.ArenaData:getSeason()))
self.txLoading:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_22)) self.txLoading:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_22))
@ -172,6 +175,7 @@ function ArenaMatchUI:showMatchResult()
self.matchLoading:setActive(false) self.matchLoading:setActive(false)
self.matchResult:setActive(true) self.matchResult:setActive(true)
UIManager:setBarsVisible(self, true) UIManager:setBarsVisible(self, true)
self.vsVfx:setActive(true)
-- self.spineVS:playAnimComplete("born", false, true, function() -- self.spineVS:playAnimComplete("born", false, true, function()
-- self.spineVS:playAnim("idle", true, true) -- self.spineVS:playAnim("idle", true, true)

View File

@ -131,7 +131,12 @@ function BattleResultUI:onLoadRootComplete()
self.doubleBtnLimitTx = uiMap["battle_result_ui.double_node.double_btn.limit_tx"] self.doubleBtnLimitTx = uiMap["battle_result_ui.double_node.double_btn.limit_tx"]
self.doubleOkBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK)) self.doubleOkBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK))
self.doubleBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.ADS_DESC_14)) self.doubleBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.ADS_DESC_14))
self.okBtn = uiMap["battle_result_ui.ok_btn"]
uiMap["battle_result_ui.ok_btn.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK))
self.okBtn:addClickListener(function()
self:onClickMask()
end)
self.doubleOkBtn:addClickListener(function() self.doubleOkBtn:addClickListener(function()
self:onClickMask() self:onClickMask()
end) end)
@ -369,7 +374,7 @@ function BattleResultUI:refreshRewards()
self.rewardNode:setVisible(true) self.rewardNode:setVisible(true)
self.rewardTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) self.rewardTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC))
self.continue:setText(I18N:getGlobalText(I18N.GlobalConst.CONTINUE_DESC)) -- self.continue:setText(I18N:getGlobalText(I18N.GlobalConst.CONTINUE_DESC))
self.rewardScrollRectComp:addInitCallback(function() self.rewardScrollRectComp:addInitCallback(function()
return GConst.TYPEOF_LUA_CLASS.REWARD_CELL return GConst.TYPEOF_LUA_CLASS.REWARD_CELL
end) end)
@ -476,38 +481,38 @@ end
function BattleResultUI:refreshDoubleNode() function BattleResultUI:refreshDoubleNode()
if self.battleType ~= GConst.BattleConst.BATTLE_TYPE.STAGE and self.battleType ~= GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE then if self.battleType ~= GConst.BattleConst.BATTLE_TYPE.STAGE and self.battleType ~= GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE then
self.doubleNode:setActive(false) self.doubleNode:setActive(false)
self.continue:setActive(true) self.okBtn:setActive(true)
return return
end end
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.AD, true) or #self.rewards <= 0 then if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.AD, true) or #self.rewards <= 0 then
self.doubleNode:setActive(false) self.doubleNode:setActive(false)
self.continue:setActive(true) self.okBtn:setActive(true)
return return
end end
if self.battleType == GConst.BattleConst.BATTLE_TYPE.STAGE then if self.battleType == GConst.BattleConst.BATTLE_TYPE.STAGE then
if not DataManager.ChapterData:canAdDouble() then if not DataManager.ChapterData:canAdDouble() then
self.doubleNode:setActive(false) self.doubleNode:setActive(false)
self.continue:setActive(true) self.okBtn:setActive(true)
else else
self.doubleNode:setActive(true) self.doubleNode:setActive(true)
GFunc.setAdsSprite(self.doubleBtnAdImg) GFunc.setAdsSprite(self.doubleBtnAdImg)
self.doubleBtnLimitTx:setText(DataManager.ChapterData:getReDoubleCount() .. "/" .. GFunc.getConstIntValue("ads_double_rewards_limit")) self.doubleBtnLimitTx:setText(DataManager.ChapterData:getReDoubleCount() .. "/" .. GFunc.getConstIntValue("ads_double_rewards_limit"))
self.doubleOkBtn:setAnchoredPositionX(125) self.doubleOkBtn:setAnchoredPositionX(125)
self.doubleBtn:setActive(true) self.doubleBtn:setActive(true)
self.continue:setActive(false) self.okBtn:setActive(false)
end end
end end
if self.battleType == GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE then if self.battleType == GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE then
if not DataManager.DailyChallengeData:canAdDouble() then if not DataManager.DailyChallengeData:canAdDouble() then
self.doubleNode:setActive(false) self.doubleNode:setActive(false)
self.continue:setActive(true) self.okBtn:setActive(true)
else else
self.doubleNode:setActive(true) self.doubleNode:setActive(true)
GFunc.setAdsSprite(self.doubleBtnAdImg) GFunc.setAdsSprite(self.doubleBtnAdImg)
self.doubleBtnLimitTx:setText(DataManager.DailyChallengeData:getReDoubleCount() .. "/" .. GFunc.getConstIntValue("daily_challenge_ads_double_rewards_limit")) self.doubleBtnLimitTx:setText(DataManager.DailyChallengeData:getReDoubleCount() .. "/" .. GFunc.getConstIntValue("daily_challenge_ads_double_rewards_limit"))
self.doubleOkBtn:setAnchoredPositionX(125) self.doubleOkBtn:setAnchoredPositionX(125)
self.doubleBtn:setActive(true) self.doubleBtn:setActive(true)
self.continue:setActive(false) self.okBtn:setActive(false)
end end
end end
end end