def event(self, event):
        """Should return true if game is still playing and false if the window should close"""
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_ESCAPE:
                statemgr.transition_switch("title", "Fade", "Fade")

        return True
 def btnNewGame(self):
     """Called when the player selects New Game.  Clear state variables, save them, then starts playing."""
     statevars.new_file("saves/save_1.json")
     statemgr.transition_switch("play", "Fade", "Spotlight", respawn=True)
 def btnContinue(self):
     """Called when player selects Continue.  Loads the old save file then starts playing."""
     statevars.load("saves/save_1.json")
     statemgr.transition_switch("play", "Fade", "Spotlight", respawn=True)