From 3b56679a32dcd889a74a364ca490427e15a030ce Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 10 Jul 2021 16:46:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9A=82=E5=81=9C=E5=90=8E?= =?UTF-8?q?=E5=9B=9E=E6=94=BE=E6=93=8D=E4=BD=9C=E8=A2=AB=E6=89=93=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/game.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index 95da060d..753280d1 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -19,15 +19,13 @@ local function _step()floatRepRate=floatRepRate+1 end local scene={} -function scene.sceneInit(org) +function scene.sceneInit() if GAME.init then resetGameData() GAME.init=false - end - replaying=GAME.replaying - if org~='pause'then floatRepRate,replayRate=0,1 end + replaying=GAME.replaying noKey=replaying noTouch=not SETTING.VKSwitch or noKey WIDGET.active.restart.hide=replaying @@ -40,7 +38,7 @@ scene.mouseDown=NULL local function restart() resetGameData(PLAYERS[1].frameRun<240 and'q') noKey=replaying - noTouch=noKey + noTouch=replaying end function scene.touchDown(x,y) if noTouch then return end @@ -176,7 +174,7 @@ local function update_common(dt) checkWarning() end function scene.update(dt) - local repPtr=replaying + local repPtr=GAME.replaying if repPtr then floatRepRate=floatRepRate+replayRate while floatRepRate>=1 do @@ -196,7 +194,7 @@ function scene.update(dt) end repPtr=repPtr+2 end - replaying=repPtr + GAME.replaying=repPtr end update_common(dt) end