From 3f343bb1b2428771d065184a9390563234559337 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 23 Nov 2021 17:22:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=E5=85=B3?= =?UTF-8?q?=E5=8D=A1=E5=92=8C=E6=AF=8F=E6=97=A5=E5=89=AF=E6=9C=AC=E6=88=98?= =?UTF-8?q?=E6=96=97=E6=94=B9=E4=B8=BA3=E5=9B=9E=E5=90=88=E5=90=8E?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=EF=BC=8C=E5=85=B6=E4=BB=96=E6=88=98=E6=96=97?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=8F=AF=E4=BB=A5=E8=B7=B3=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/BattlePanel.lua | 45 ++++++++++++++----- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 23aa5e5e5f..3d67d74fd4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -27,9 +27,9 @@ local SKIP_STATE = { } local UpdateBtnGMFunc = { [-1] = function() - if not BattleManager.IsUnlockBattlePass() then - return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" - end + -- if not BattleManager.IsUnlockBattlePass() then + -- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" + -- end return SKIP_STATE.UNLOCK end, [BATTLE_TYPE.BACK]= function() @@ -48,11 +48,26 @@ local UpdateBtnGMFunc = { -- return SKIP_STATE.NOUSE, "日常副本战斗无法跳过!" -- end, [BATTLE_TYPE.STORY_FIGHT] = function() - if not BattleManager.IsUnlockBattlePass() then - return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" + -- if not BattleManager.IsUnlockBattlePass() then + -- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" + -- end + -- if FightPointPassManager.GetCurOpenFightIdIsBoss() then + -- return SKIP_STATE.NOUSE, "首领关卡无法跳过!" + -- end + if this.curRound <= 3 then + return SKIP_STATE.NOUSE, "跳过功能将在第三回合后解锁" end - if FightPointPassManager.GetCurOpenFightIdIsBoss() then - return SKIP_STATE.NOUSE, "首领关卡无法跳过!" + return SKIP_STATE.UNLOCK + end, + [BATTLE_TYPE.DAILY_CHALLENGE] = function() + -- if not BattleManager.IsUnlockBattlePass() then + -- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" + -- end + -- if FightPointPassManager.GetCurOpenFightIdIsBoss() then + -- return SKIP_STATE.NOUSE, "首领关卡无法跳过!" + -- end + if this.curRound <= 3 then + return SKIP_STATE.NOUSE, "跳过功能将在第三回合后解锁" end return SKIP_STATE.UNLOCK end, @@ -363,16 +378,22 @@ function this:InitOption() this.Option:SetActive(true) Util.GetGameObject(this.BtnTimeScale, "lock"):SetActive(not BattleManager.IsUnlockBattleSpeed()) - - local state, tip = self:GetSkipState() - this.jumpLock:SetActive(state == SKIP_STATE.LOCK) - Util.SetColor(this.BtnJumpFight, state == SKIP_STATE.NOUSE and UIColor.DEEPGRAY or UIColor.WRITE) + -- 设置跳过按钮的状态 + this.SetJumpBtnState() -- 初始化战斗时间,刷新前端显示 BattleManager.InitTimeScale() this.SwitchTimeScale() end +-- 设置跳过按钮的状态 +function this.SetJumpBtnState() + local state, tip = this:GetSkipState() + this.jumpLock:SetActive(state == SKIP_STATE.LOCK) + Util.SetColor(this.BtnJumpFight, state == SKIP_STATE.NOUSE and UIColor.DEEPGRAY or UIColor.WRITE) +end + + function this.SwitchTimeScale() local _scale = BattleManager.GetTimeScale() local child = this.BtnTimeScale.transform.childCount - 3 -- 3倍速时-2 @@ -717,6 +738,8 @@ function this.OnRoundChanged(round) end this.roundText.text = string.format(Language[10211], curRound, maxRound) + -- 设置跳过按钮的状态 + this.SetJumpBtnState() end -- 角色轮转回调 function this.RoleTurnChange(role)