From 89b0eb0b44a63165785a2f25695f318b5d49fc0d Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 22 Mar 2021 16:43:34 +0100 Subject: [PATCH] fix: delay menu unpausing --- sonic-radiance.love/scenes/overworld/init.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sonic-radiance.love/scenes/overworld/init.lua b/sonic-radiance.love/scenes/overworld/init.lua index 15f6fca..0977274 100644 --- a/sonic-radiance.love/scenes/overworld/init.lua +++ b/sonic-radiance.love/scenes/overworld/init.lua @@ -123,14 +123,20 @@ function OverWorld:pause() screens.mainmenu.pause(self) end +function OverWorld:timerResponse(timer) + if (timer == "unPause") then + self.isPaused = false + self.world.isActive = true + end +end + function OverWorld:unpause() self.tweens:newTween(0.1, 0.2, {backGroundOpacity=0}, "inQuad") self.tweens:newTween(0, 0.3, {borderPosition=0}, "inOutQuad") self.tweens:newTween(0, 0.3, {emblemPosition=368}, "inOutQuad") self.tweens:newTween(0, 0.3, {ringBorder=16}, "inOutQuad") self.tweens:newTween(0, 0.3, {timeBorder=-20}, "inOutQuad") - self.isPaused = false - self.world.isActive = true + self.tweens:newTimer(0.2, "unPause") if (self.currentScreen ~= nil) then self.currentScreen:quit()