fix: delay menu unpausing

This commit is contained in:
Kazhnuz 2021-03-22 16:43:34 +01:00
parent d4fd401ee4
commit 89b0eb0b44

View file

@ -123,14 +123,20 @@ function OverWorld:pause()
screens.mainmenu.pause(self) screens.mainmenu.pause(self)
end end
function OverWorld:timerResponse(timer)
if (timer == "unPause") then
self.isPaused = false
self.world.isActive = true
end
end
function OverWorld:unpause() function OverWorld:unpause()
self.tweens:newTween(0.1, 0.2, {backGroundOpacity=0}, "inQuad") 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, {borderPosition=0}, "inOutQuad")
self.tweens:newTween(0, 0.3, {emblemPosition=368}, "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, {ringBorder=16}, "inOutQuad")
self.tweens:newTween(0, 0.3, {timeBorder=-20}, "inOutQuad") self.tweens:newTween(0, 0.3, {timeBorder=-20}, "inOutQuad")
self.isPaused = false self.tweens:newTimer(0.2, "unPause")
self.world.isActive = true
if (self.currentScreen ~= nil) then if (self.currentScreen ~= nil) then
self.currentScreen:quit() self.currentScreen:quit()