tcx_xiyou_yueNan
zhangjiannan 2025-05-21 11:36:37 +08:00
parent e30c71794f
commit ac7528f3a1
2 changed files with 18 additions and 9 deletions

View File

@ -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

View File

@ -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