def loadNewArea(xml,Level): global gameEngine global graphicsEngine global clock gameEngine.clearActors() gameEngine.clearNPCs() gameEngine.clearTriggers() graphicsEngine.clearObjects() level.load(xml,Level,gameEngine,graphicsEngine) clock.tick()
inputEngine = Input.InputEngine() errors.init(screen,level=config.LogVerbosity,quiet=False) pygame.key.set_repeat(250,100) Icons.load() #allies=[player.Player("Markus Clarkus ",3,1,[0,255,255],1,[0,255,127],False).getBattleObject(),player.Player("Clark",3,1,[0,255,255],1,[0,255,127],False).getBattleObject()] #enemies=[enemies.GreenSlime(1,100)] #battle.BattleTest(screen,allies,enemies) options = [["Levels/TestArea/Test.xml","Test1"],["Levels/TestArea/Test.xml","Test3"],["Levels/TestArea/TestVillage.xml","VillageMain"]] choice = random.choice(options) choice = ["Levels/TestArea/TestVillage.xml","VillageMain"] #choice = ["Levels/TestArea/Test.xml","Test1"] level.load(choice[0],choice[1],gameEngine,graphicsEngine) transitions.fadeFromColor(screen,screen.screen.copy(),[0,0,0],.5) menu = MainMenu() while menu: for inp in inputEngine.getInput(): if inp[0] == "Quit": pygame.quit() exit() elif inp[1] == "Down": if inp[0] == "Accept": menu.Select() elif inp[0] == "Cancel": menu.Cancel()