【战斗】修复回合末释放的灵兽技能释放时界面显示已经到下一回合的问题
parent
c3537b3486
commit
e1625e6bed
|
@ -215,27 +215,30 @@ function BattleLogic.TurnRound(debugTurn)
|
|||
-- 上一轮结束
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundEnd, CurRound)
|
||||
end
|
||||
CurRound = CurRound + 1
|
||||
CurCamp = BattleLogic.FirstCamp -- 判断先手阵营
|
||||
CurSkillPos[0] = 0
|
||||
CurSkillPos[1] = 0
|
||||
--
|
||||
BattleLogManager.Log(
|
||||
"Round Change",
|
||||
"round", CurRound
|
||||
)
|
||||
-- 轮数变化
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundChange, CurRound)
|
||||
-- 开始
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundStart, CurRound)
|
||||
|
||||
|
||||
-- 检测一次灵兽技能
|
||||
SkillManager.CheckMonsterSkill(function()
|
||||
--轮数变化后延时0.2秒用于初始化监听回合数被动的初始化
|
||||
BattleLogic.WaitForTrigger(0.2,function()
|
||||
-- 进入新轮
|
||||
BattleLogic.CheckBattleLogic()
|
||||
CurRound = CurRound + 1
|
||||
CurCamp = BattleLogic.FirstCamp -- 判断先手阵营
|
||||
CurSkillPos[0] = 0
|
||||
CurSkillPos[1] = 0
|
||||
--
|
||||
BattleLogManager.Log(
|
||||
"Round Change",
|
||||
"round", CurRound
|
||||
)
|
||||
-- 轮数变化
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundChange, CurRound)
|
||||
-- 开始
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundStart, CurRound)
|
||||
|
||||
|
||||
-- 检测一次灵兽技能
|
||||
SkillManager.CheckMonsterSkill(function()
|
||||
--轮数变化后延时0.2秒用于初始化监听回合数被动的初始化
|
||||
BattleLogic.WaitForTrigger(0.2,function()
|
||||
-- 进入新轮
|
||||
BattleLogic.CheckBattleLogic()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
else
|
||||
|
|
|
@ -96,11 +96,15 @@ end
|
|||
-- 检测是否需要等待灵兽技能
|
||||
function this.CheckMonsterSkill(func)
|
||||
this.MonsterCheckFunc = func
|
||||
-- 判断是否可以向下执行
|
||||
if not this.IsSkilling and (not this.MonsterSkillList or #this.MonsterSkillList == 0) then
|
||||
--
|
||||
if this.MonsterCheckFunc then
|
||||
this.MonsterCheckFunc()
|
||||
local func = this.MonsterCheckFunc
|
||||
-- 置空方法放到回调之前,避免再会调中再次调用检测方法导致方法被删除
|
||||
this.MonsterCheckFunc = nil
|
||||
func()
|
||||
end
|
||||
this.MonsterCheckFunc = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue