修正游戏中途退出时结算不正确

This commit is contained in:
MrZ626
2020-12-14 17:04:59 +08:00
parent 6e3961fe0f
commit 2512bace19

View File

@@ -122,11 +122,9 @@ function scene.sceneInit(org)
end
function scene.sceneBack()
love.keyboard.setKeyRepeat(true)
if not GAME.replaying and(GAME.frame>400 or GAME.result)then
STAT.todayTime=STAT.todayTime+PLAYERS[1].stat.time
if not GAME.replaying and(GAME.frame>400 or GAME.result)and not GAME.result then
mergeStat(STAT,PLAYERS[1].stat)
STAT.todayTime=STAT.todayTime+PLAYERS[1].stat.time
end
if not GAME.result then
FILE.save(STAT,"conf/data")
end
end