onExit call for exiting prematurely

pull/16/head
Ishaan Bhardwaj 2021-02-19 15:58:00 -05:00
parent 8a459b68ba
commit 1dfe68ccff
1 changed files with 1 additions and 0 deletions

View File

@ -129,6 +129,7 @@ function GameScene:onInputPress(e)
if self.paused then pauseBGM() if self.paused then pauseBGM()
else resumeBGM() end else resumeBGM() end
elseif e.input == "menu_back" then elseif e.input == "menu_back" then
self.game:onExit()
scene = ModeSelectScene() scene = ModeSelectScene()
elseif e.input and string.sub(e.input, 1, 5) ~= "menu_" then elseif e.input and string.sub(e.input, 1, 5) ~= "menu_" then
self.inputs[e.input] = true self.inputs[e.input] = true