【战斗】关卡和每日副本战斗改为3回合后跳过,其他战斗直接可以跳过
parent
9cce1aa31c
commit
3f343bb1b2
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue