修复暂停时设置能进入彩蛋模式 close #206

This commit is contained in:
MrZ626
2021-08-16 01:27:11 +08:00
parent 9dbb32c982
commit 45dce3210a
8 changed files with 18 additions and 8 deletions

View File

@@ -641,6 +641,7 @@ function love.run()
gc_print("Lines "..FREEROW.getCount(),safeX+5,-60) gc_print("Lines "..FREEROW.getCount(),safeX+5,-60)
gc_print("Tasks "..TASK.getCount(),safeX+5,-80) gc_print("Tasks "..TASK.getCount(),safeX+5,-80)
gc_print("Voices "..VOC.getQueueCount(),safeX+5,-100) gc_print("Voices "..VOC.getQueueCount(),safeX+5,-100)
gc_print(tostring(GAME.playing),safeX+5,-120)
--Update & draw frame time --Update & draw frame time
ins(frameTimeList,1,dt)rem(frameTimeList,126) ins(frameTimeList,1,dt)rem(frameTimeList,126)

View File

@@ -251,6 +251,7 @@ function loadGame(mode,ifQuickPlay,ifNet)--Load a mode and go to game scene
freshDate() freshDate()
if legalGameTime()then if legalGameTime()then
if MODES[mode].score then STAT.lastPlay=mode end if MODES[mode].score then STAT.lastPlay=mode end
GAME.playing=true
GAME.init=true GAME.init=true
GAME.fromRepMenu=false GAME.fromRepMenu=false
GAME.curModeName=mode GAME.curModeName=mode

View File

@@ -155,6 +155,7 @@ FIELD={}--Field(s) for custom game
BAG={}--Sequence for custom game BAG={}--Sequence for custom game
MISSION={}--Clearing mission for custom game MISSION={}--Clearing mission for custom game
GAME={--Global game data GAME={--Global game data
playing=false, --If in-game
init=false, --If need initializing game when enter scene-play init=false, --If need initializing game when enter scene-play
net=false, --If play net game net=false, --If play net game

View File

@@ -78,6 +78,10 @@ function scene.sceneInit(org)
NET.specSRID=false NET.specSRID=false
end end
end end
function scene.sceneBack()
destroyPlayers()
GAME.playing=false
end
scene.mouseDown=NULL scene.mouseDown=NULL
function scene.mouseMove(x,y)netPLY.mouseMove(x,y)end function scene.mouseMove(x,y)netPLY.mouseMove(x,y)end

View File

@@ -129,6 +129,7 @@ function scene.keyDown(key,isRep)
if isRep then return end if isRep then return end
if key=="q"then if key=="q"then
SCN.back() SCN.back()
GAME.playing=false
elseif key=="escape"then elseif key=="escape"then
SCN.swapTo(GAME.result and'game'or'depause','none') SCN.swapTo(GAME.result and'game'or'depause','none')
elseif key=="s"then elseif key=="s"then

View File

@@ -58,7 +58,7 @@ end
local function nextDir(i) local function nextDir(i)
SETTING.face[i]=(SETTING.face[i]+1)%4 SETTING.face[i]=(SETTING.face[i]+1)%4
minoRot0[i]=minoRot0[i]+1.5707963 minoRot0[i]=minoRot0[i]+1.5707963
if minoRot0[5]>62 then if minoRot0[5]>62 and not GAME.playing then
loadGame('marathon_bfmax',true) loadGame('marathon_bfmax',true)
end end
SFX.play('rotate') SFX.play('rotate')

View File

@@ -25,7 +25,7 @@ function scene.mouseDown(x,y)
jump=10 jump=10
local t=TIME()-last local t=TIME()-last
if t>1 then if t>1 then
if t>2.6 and t<3 then if t>2.6 and t<3 and not GAME.playing then
loadGame('sprintSmooth',true) loadGame('sprintSmooth',true)
else else
VOC.play( VOC.play(

View File

@@ -20,11 +20,13 @@ end
function scene.mouseDown(x,y) function scene.mouseDown(x,y)
local T=40*math.min(time,45) local T=40*math.min(time,45)
if x>230 and x<1050 then if not GAME.playing then
if math.abs(y-800+T)<70 then if x>230 and x<1050 then
loadGame('sprintLock',true) if math.abs(y-800+T)<70 then
elseif math.abs(y-2160+T)<70 then loadGame('sprintLock',true)
loadGame('sprintFix',true) elseif math.abs(y-2160+T)<70 then
loadGame('sprintFix',true)
end
end end
end end
end end
@@ -37,7 +39,7 @@ function scene.keyDown(key,isRep)
if isRep then return end if isRep then return end
if key=="escape"then if key=="escape"then
SCN.back() SCN.back()
else elseif not GAME.playing then
if key=="l"then if key=="l"then
loadGame('sprintLock',true) loadGame('sprintLock',true)
elseif key=="f"then elseif key=="f"then