diff --git a/lua/app/common/sdk_pay_ios_manager.lua b/lua/app/common/sdk_pay_ios_manager.lua index fe9a0184..e016700f 100644 --- a/lua/app/common/sdk_pay_ios_manager.lua +++ b/lua/app/common/sdk_pay_ios_manager.lua @@ -249,11 +249,11 @@ end function SDKPayiOSManager:doIosPay(productId, orderId, rechargeId, giftType, purchaseType, giftId, callback) self.blockTouch = true - UIManager:showWaitNet() + UIManager:showWaitPay() CS.BF.BFMain.Instance.SDKMgr.IosPaySDKMgr.buyCallback = function(isSuccess, result, errorStr) if self.blockTouch then self.blockTouch = false - UIManager:hideWaitNet() + UIManager:hideWaitPay() end if isSuccess then Logger.log("ios pay availableToPurchase = %s", result.availableToPurchase) diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index 02c84fcd..776bee8b 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -264,7 +264,8 @@ GConst.DOTWEEN_IDS = { WAIT_NET = 4, TUTORIAL = 5, TASK_TOAST = 6, - BATTLE_UI = 7 + BATTLE_UI = 7, + WAIT_PAY = 8 } GConst.MESSAGE_BOX_TYPE = { diff --git a/lua/app/ui/ui_manager.lua b/lua/app/ui/ui_manager.lua index f1c9a958..02119b18 100644 --- a/lua/app/ui/ui_manager.lua +++ b/lua/app/ui/ui_manager.lua @@ -753,6 +753,33 @@ function UIManager:getUICameraComponent() return self.uiCamera:getComponent(GConst.TYPEOF_UNITY_CLASS.CAMERA) end +function UIManager:showWaitPay() + if self.waitNetCount == 0 then + if self.waitPaySeq == nil then + local seq = DOTweenManager:createSeqWithIntId(GConst.DOTWEEN_IDS.WAIT_PAY) + seq:SetAutoKill(false) + seq:AppendInterval(1) + seq:AppendCallback(function() + self.netCanvas:setActive(true) + end) + self.waitPaySeq = seq + elseif not self.waitPaySeq:IsPlaying() then + self.waitPaySeq:Restart() + end + end + self.waitNetCount = self.waitNetCount + 1 + self:disableTouch() +end + +function UIManager:hideWaitPay() + self:hideWaitNet() + if self.waitNetCount <= 0 then + if self.waitPaySeq then + self.waitPaySeq:Pause() + end + end +end + function UIManager:showWaitNet(forceRestart) if self.waitNetCount == 0 or forceRestart then if self.waitNetSeq == nil then @@ -1183,7 +1210,8 @@ if NOT_PUBLISH then [BaseUI.disableUITouch] = true, [BaseScene.disableTouch] = true, [UIManager.showLoading] = true, - [UIManager.showWaitNet] = true + [UIManager.showWaitNet] = true, + [UIManager.showWaitPay] = true } end local currFunc = debug.getinfo(2, "f").func