快速重开不播放入场动画

This commit is contained in:
MrZ626
2020-12-20 23:17:51 +08:00
parent ecc1ae826f
commit d0ec3f4139
4 changed files with 26 additions and 25 deletions

View File

@@ -137,11 +137,11 @@ function scene.keyDown(key)
GAME.prevBG=BG.cur
SCN.go("setting_sound")
elseif key=="r"then
resetGameData()
resetGameData(false,false)
SCN.swapTo("play","none")
elseif key=="p"then
if(GAME.result or GAME.replaying)and #PLAYERS==1 then
resetGameData(true)
resetGameData(true,false)
SCN.swapTo("play","none")
end
elseif key=="o"then

View File

@@ -30,7 +30,7 @@ function scene.sceneInit()
love.keyboard.setKeyRepeat(false)
GAME.restartCount=0
if GAME.init then
resetGameData()
resetGameData(false,false)
GAME.init=nil
end
noKey=GAME.replaying
@@ -204,7 +204,7 @@ function scene.update(dt)
elseif P1.keyPressing[10]then
GAME.restartCount=GAME.restartCount+1
if GAME.restartCount>20 then
resetGameData()
resetGameData(false,false)
return
end
elseif GAME.restartCount>0 then