Пример #1
0
    def __init__(self, targetMap=None):
        GameObject.__init__(self)

        if self.targetMap == None:
            self.targetMap = "map" + str(gameLogic.getHighestMapNumber()) + ".map"
        else:
            self.targetMap = targetMap
Пример #2
0
 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)
Пример #3
0
 def savemapAs(self, gameState):
     import guiTools
     mapNumber = guiTools.ask(gameState.screen, "Save map as (number)", str( gameLogic.getHighestMapNumber()+1 ) )
     self.savemap( os.path.join('data', "map" + str(mapNumber)  + ".map") )