【战斗】添加超时检测

dev_chengFeng
gaoxin 2020-11-20 15:07:08 +08:00
parent 0548b16015
commit 2331c8d013
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(), --等级