def main(self): """Main""" # check for lock file self.check_game_lock() # IN GAME if self.ingame: self.activescr.init() elif not self.ingame and self.inmenu: pass while self.activescr.running: self.events() self.update() self.redraw(self.screen) PluginSystem.run() self.timer.tick(30) pygame.display.flip() # Save game if self.ingame: self.activescr.deinit() # remove lock self.remove_game_lock()
def main(self): """Main""" #check for lock file self.check_game_lock() #IN GAME if self.ingame: self.activescr.init() elif not self.ingame and self.inmenu: pass while self.activescr.running: self.events() self.update() self.redraw(self.screen) PluginSystem.run() self.timer.tick(30) pygame.display.flip() #Save game if self.ingame: self.activescr.deinit() #remove lock self.remove_game_lock()