Beispiel #1
0
def main():
    signal.signal(signal.SIGINT, signal_handler)
    resourceManager.init('assets/', imgs)
    config = Config('config.json')
    gui.loadSkin(config.skin)
    game = Game(config)
    game.init()
    game.addScene("edit", Editor(game))
    game.setScene("edit", dict(mapName=config.map))
    game.run()
    game.quit()
Beispiel #2
0
def main():
    signal.signal(signal.SIGINT, signal_handler)
    resourceManager.init('assets/', imgs)
    config = Config('config.json')
    gui.loadSkin(config.skin)
    game = Game(config)
    game.init()
    game.addScene("main", MainMenu(game))
    game.addScene("play", Playground(game))
    game.addScene("edit", Editor(game))
    game.setScene("main")
    # res.playSong('background1')
    game.run()
    game.quit()