From ac7528f3a15fa6bb550d488e23c677d2247618ae Mon Sep 17 00:00:00 2001 From: vurtne14 Date: Wed, 21 May 2025 11:36:37 +0800 Subject: [PATCH] 1 --- .../~Lua/Modules/Battle/BattleManager.lua | 4 ++-- .../~Lua/Modules/Battle/View/BattlePanel.lua | 23 +++++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index e7af437794..6efadda2c9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -1101,8 +1101,8 @@ end -- 战斗加速控制 BATTLE_TIME_SCALE_ZERO = 0 BATTLE_TIME_SCALE_ONE = 1.1 -BATTLE_TIME_SCALE_TWO = 2.5 -BATTLE_TIME_SCALE_THREE = 3 +BATTLE_TIME_SCALE_TWO = 1.8 +BATTLE_TIME_SCALE_THREE = 2.5 this.TimeScale = 0 function this.InitTimeScale() this.TimeScale = 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index bec1e027d1..b2e21fac7b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -171,7 +171,7 @@ function this:BindEvent() --SubmitExtraData({ type = SDKSubMitType.TYPE_CUSTOM, roleLevelUpTime = "x3_stage" }) SubmitExtraData({ type = SDKSubMitType.TYPE_CUSTOM_PARAMS, - roleLevelUpTime = "x3_stage", + roleLevelUpTime = "x2_stage", roleCreateTime = "stage-id|" .. tostring(FightPointPassManager.GetCurFightId() .. "|role-level|" .. tostring(PlayerManager.level)) @@ -181,7 +181,14 @@ function this:BindEvent() -- if BattleManager.IsUnlockBattleSpeedThree() then -- BattleManager.SetTimeScale(BATTLE_TIME_SCALE_THREE) --else - BattleManager.SetTimeScale(BATTLE_TIME_SCALE_ONE) + SubmitExtraData({ + type = SDKSubMitType.TYPE_CUSTOM_PARAMS, + roleLevelUpTime = "x3_stage", + roleCreateTime = + "stage-id|" .. + tostring(FightPointPassManager.GetCurFightId() .. "|role-level|" .. tostring(PlayerManager.level)) + }) + BattleManager.SetTimeScale(BATTLE_TIME_SCALE_THREE) --end elseif scale == BATTLE_TIME_SCALE_THREE then -- 三倍速回到一倍速 @@ -475,12 +482,14 @@ function this.SetJumpBtnState() end function this.SwitchTimeScale() - local _scale = math.floor(BattleManager.GetTimeScale()) + --local _scale = math.floor(BattleManager.GetTimeScale()) + local _scale = BattleManager.GetTimeScale() + _scale = math.floor(_scale + 0.5) --如果之前是三倍速,强制转成二倍速 - if _scale == 2 then - BattleManager.SetTimeScale(BATTLE_TIME_SCALE_TWO) - _scale = 3 - end + --if _scale == 2 then + --BattleManager.SetTimeScale(BATTLE_TIME_SCALE_TWO) + --_scale = 3 + --end this.TimeScaleTxt.text = _scale -- local child = this.BtnTimeScale.transform.childCount - 2 -- 3倍速时-2