【战斗】修复回合末释放的灵兽技能释放时界面显示已经到下一回合的问题

dev_chengFeng
gaoxin 2020-11-03 16:20:41 +08:00
parent c3537b3486
commit e1625e6bed
2 changed files with 28 additions and 21 deletions

View File

@ -215,6 +215,8 @@ function BattleLogic.TurnRound(debugTurn)
-- 上一轮结束
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundEnd, CurRound)
end
-- 检测一次灵兽技能
SkillManager.CheckMonsterSkill(function()
CurRound = CurRound + 1
CurCamp = BattleLogic.FirstCamp -- 判断先手阵营
CurSkillPos[0] = 0
@ -238,6 +240,7 @@ function BattleLogic.TurnRound(debugTurn)
BattleLogic.CheckBattleLogic()
end)
end)
end)
else
-- 检测一次灵兽技能

View File

@ -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()
end
local func = this.MonsterCheckFunc
-- 置空方法放到回调之前,避免再会调中再次调用检测方法导致方法被删除
this.MonsterCheckFunc = nil
func()
end
end
end