【战斗】添加超时检测

dev_chengFeng hotfix/xma/test/0.1.40
gaoxin 2020-11-20 15:07:08 +08:00 committed by JieLing
parent 74f46826a9
commit 626980a1bc
2 changed files with 9 additions and 0 deletions

View File

@ -345,6 +345,12 @@ end
function BattleLogic.Update()
curFrame = curFrame + 1
-- 强制退出
if curFrame > BattleMaxFrame then
assert(false, "Battle Time Out !!!")
BattleLogic.BattleEnd(-1)
return
end
local roleResult = RoleManager.GetResult()
if roleResult == 0 then
BattleLogic.BattleEnd(0)

View File

@ -129,6 +129,9 @@ BattleEventName = {
ShowHintText = indexAdd(),
}
BattleMaxFrame = 1000000
index = 0
RoleDataName = {
Level = indexAdd(), --等级