From d888db9195a37e0aa87072f25c18d344bda6b700 Mon Sep 17 00:00:00 2001 From: MrZ_26 Date: Wed, 5 Aug 2020 00:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=85=E5=9C=A8=E5=BC=80=E5=B1=80=E5=92=8C?= =?UTF-8?q?=E9=80=80=E5=87=BA=E5=BD=93=E5=89=8D=E6=B8=B8=E6=88=8F=E6=97=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/scene.lua | 4 +++- parts/gametoolfunc.lua | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Zframework/scene.lua b/Zframework/scene.lua index 77df87c3..b44223fa 100644 --- a/Zframework/scene.lua +++ b/Zframework/scene.lua @@ -294,7 +294,9 @@ function sceneBack.load() end function sceneBack.pause() love.keyboard.setKeyRepeat(true) - mergeStat(stat,players[1].stat) + if not game.replaying then + mergeStat(stat,players[1].stat) + end TASK.clear("play") end function sceneBack.setting_game() diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 36a286db..5bb5cd7e 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -161,6 +161,7 @@ function mergeStat(stat,delta) end end end + function randomTarget(P)--Return a random opponent for P if #players.alive>1 then local R @@ -236,6 +237,7 @@ function royaleLevelup() end end end + function pauseGame() if not SCN.swapping then restartCount=0--Avoid strange darkness @@ -267,6 +269,10 @@ function loadGame(M,ifQuickPlay) SFX.play("enter") end function resetGameData() + if players[1]and not game.replaying then + mergeStat(stat,players[1].stat) + end + game.frame=150-setting.reTime*15 game.result=false game.pauseTime=0 @@ -309,6 +315,10 @@ function resetGameData() collectgarbage() end function resetPartGameData(replaying) + if players[1]and not game.replaying then + mergeStat(stat,players[1].stat) + end + game.result=false game.garbageSpeed=1 if replaying then