def open(self, gameState): gameState.scoreFromPreviousLevel = gameState.scoore gameState.thor.prevMapUsedUpSuperShots = gameState.thor.usedUpSuperShots gameState.map = mapLogic.Map() gameState.map.loadmap(self.targetMap) gameState.mapname = self.targetMap gameLogic.reset(gameState)
def newMapFromScratch(self, gameState): startingBlock = gameObjects.Block() startingBlock.setposition(300, 400) newMap = Map() newMap.addBlock(startingBlock) newMapFileName = "map" + str( gameLogic.getHighestMapNumber()+1 ) + ".map" newMap.savemap( os.path.join('data', newMapFileName) ) self.loadmap(newMapFileName) gameLogic.reset(gameState)
def open(self, gameState): gameState.scoreFromPreviousLevel = gameState.scoore gameState.map = mapLogic.Map() gameState.map.loadmap(self.targetMap) gameState.mapname = self.targetMap gameLogic.reset(gameState)
def die(self, gameState): gameLogic.reset(gameState)