本文整理汇总了Python中map.Map.read方法的典型用法代码示例。如果您正苦于以下问题:Python Map.read方法的具体用法?Python Map.read怎么用?Python Map.read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类map.Map
的用法示例。
在下文中一共展示了Map.read方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: editMap
# 需要导入模块: from map import Map [as 别名]
# 或者: from map.Map import read [as 别名]
def editMap():
global mapEditor, ctrlLayer, mapLayer
mapfile = "./map/%s"%(editMapPanel.listBox.selectedtext())
ctrlLayer = mapEditor
mapEditor.mapfile = mapfile
mapLayer = Map(mapwidth,mapheight)
mapEditor.map = mapLayer
mapLayer.read(mapfile)
loader = Loader()
loader.load(images["loadmap"],screen,mapLayer.load,\
[images["bar"].subsurface(0,0,barlength,barheight),(barx,bary)])
ctrlLayer.minimap = mapLayer.minimap
示例2: startNewGame
# 需要导入模块: from map import Map [as 别名]
# 或者: from map.Map import read [as 别名]
def startNewGame():
global ctrlLayer, startMenu, mapLayer, characterLayer
ctrlLayer = gameController
mapLayer = Map(mapwidth,mapheight)
characterLayer = Game(mapLayer)
characterLayer.initNewGame(defaultplayers)
ctrlLayer.takeOverGame(characterLayer,characterLayer.players[0])
ctrlLayer.map = mapLayer
mapLayer.read("./map/%s"%(startMenu.mapfilename))
loader = Loader()
loader.load(images["loadmap"],screen,mapLayer.load,\
[images["bar"].subsurface(0,0,barlength,barheight),(barx,bary)])
ctrlLayer.minimap = mapLayer.minimap
characterLayer.running = True