竞技场取消

This commit is contained in:
puxuan 2025-11-07 16:11:54 +08:00
parent b4cb94eb90
commit 9c5492c5b5
2 changed files with 41 additions and 1 deletions

View File

@ -252,7 +252,10 @@ function ArenaManager:rspAdBoxReward(result)
if result.err_code == GConst.ERROR_STR.SUCCESS then
self.willShowAdBoxState = nil
local idx = result.reqData.win and 2 or 1
ModuleManager.ShopManager:showBoxOpenUI({type = GConst.ShopConst.BOX_REWARD_TYPE.ARENA_AD_BOX, params = idx, rewards = result.rewards})
-- ModuleManager.ShopManager:showBoxOpenUI({type = GConst.ShopConst.BOX_REWARD_TYPE.ARENA_AD_BOX, params = idx, rewards = result.rewards})
if result.rewards then
GFunc.showRewardBox(result.rewards)
end
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ARENA_AD_BOX_SUCCESS)
end
end

View File

@ -5,6 +5,7 @@ local DEFAULT_X = 10000
local ALPHA_COLOR = BF.Color(1, 1, 1, 0)
local BLACK_ALPHA_COLOR = BF.Color(0, 0, 0, 0)
local TIPS_BG = {"battle_bg_6", "battle_bg_14"}
local ELIMINATION_TOUCH_EVENT = GConst.ELIMINATION_TOUCH_EVENT
---------------------------------必须重写的方法----------------------------------
function BattleUIPVP:initBaseInfo()
@ -154,6 +155,42 @@ function BattleUIPVP:initCounterAttack()
self.counterAttackNode:setVisible(false)
end
function BattleUIPVP:initTouchCancel()
local uiMap = self.root:genAllChildren()
local touchCancelNode = uiMap["battle_ui_pvp.board_root_node.board_center_node.touch_cancel_node"]
touchCancelNode:setVisible(false)
touchCancelNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_ELIMINATION_TOUCH_EVENT):AddTouchEventListener(function(eventType)
if eventType == ELIMINATION_TOUCH_EVENT.ENTER then -- 取消链接
self.battleController:clearGridSequence()
AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_CANCEL)
end
end)
-- local w, h = GFunc.getUIExpandScreenSize()
-- local addW = h - CS.BF.GameConst.DESIGN_RESOLUTION_HEIGHT
-- touchCancelNode:setSizeDeltaY(509 + addW)
local allImg = uiMap["battle_ui_pvp.board_root_node.board_center_node.touch_cancel_node.all_img"]
allImg:setVisible(false)
uiMap["battle_ui_pvp.board_root_node.board_center_node.touch_cancel_node.all_img.tips_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_13))
end
function BattleUIPVP:showTouchCancel()
if self.battleController.curActionSide ~= GConst.BattleConst.SIDE_ATK then
return
end
local uiMap = self.root:genAllChildren()
local touchCancelNode = uiMap["battle_ui_pvp.board_root_node.board_center_node.touch_cancel_node"]
touchCancelNode:setVisible(true)
-- 判断是否显示提示框
local allImg = uiMap["battle_ui_pvp.board_root_node.board_center_node.touch_cancel_node.all_img"]
allImg:setVisible(true)
end
function BattleUIPVP:hideTouchCancel()
local uiMap = self.root:genAllChildren()
local touchCancelNode = uiMap["battle_ui_pvp.board_root_node.board_center_node.touch_cancel_node"]
touchCancelNode:setVisible(false)
end
--------------------------------end必须重写的方法--------------------------------
function BattleUIPVP:getBGMId()