diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 80609f6c..f39a8180 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -451,9 +451,6 @@ function pauseGame() SCN.swapTo("pause","none") end end -function resumeGame() - SCN.swapTo("play","none") -end function applyCustomGame()--Apply CUSTOMENV, BAG, MISSION for k,v in next,CUSTOMENV do GAME.modeEnv[k]=v diff --git a/parts/scenes/depause.lua b/parts/scenes/depause.lua new file mode 100644 index 00000000..ca745615 --- /dev/null +++ b/parts/scenes/depause.lua @@ -0,0 +1,38 @@ +local gc=love.graphics +local int=math.floor + +local scene={} + +local timer + +function scene.sceneInit() + timer=2 +end + +scene.keyDown=NULL +scene.mouseDown=NULL +scene.touchDown=NULL + +function scene.update(dt) + timer=timer-dt + if timer<0 then + SCN.swapTo("play","none") + end +end + +function scene.draw() + if timer<1 then + SCN.scenes.play.draw() + end + + gc.setColor(.15,.15,.15,timer) + gc.push("transform") + gc.origin() + gc.rectangle("fill",0,0,SCR.w,SCR.h) + gc.pop() + + gc.setColor(1,1,1,5*(2-timer)) + gc.arc("fill","pie",640,360,160,-1.5708,timer*3.1416-1.5708) +end + +return scene \ No newline at end of file diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index b956dad5..8149c45a 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -134,7 +134,7 @@ function scene.keyDown(key) if key=="q"then SCN.back() elseif key=="escape"then - resumeGame() + SCN.swapTo(GAME.result and"play"or"depause","none") elseif key=="s"then GAME.prevBG=BG.cur SCN.go("setting_sound")