本文整理汇总了Python中level.Level.values方法的典型用法代码示例。如果您正苦于以下问题:Python Level.values方法的具体用法?Python Level.values怎么用?Python Level.values使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类level.Level
的用法示例。
在下文中一共展示了Level.values方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_level
# 需要导入模块: from level import Level [as 别名]
# 或者: from level.Level import values [as 别名]
def generate_level(self):
self._level_count += 1
min_rooms = 5
size = 20, 20
# generate the tile types
tiletypes, rooms = self._level_generator.generate(size, min_rooms)
level = Level(self.player, tiletypes, self._level_count)
# generate the objects
objects = self._object_generator.generate(min_rooms, self._level_count)
self._object_generator.place_objects(objects, level)
# generate monsters
species = self._species_generator.generate_level(self._level_count)
beings = [Being(self.controller, s) for s in species]
self._species_generator.place_beings(beings, level)
# set the player on a up staircase
tile = level.staircases_up[0]
level.add_being(tile, self.player)
self.levels.append(level)
self._current_level = level
# housekeeping
# FIXME this will need to move to change_level
for being in [b for b in level.beings]:
being.new_level(level._size)
self.turn_done(move_monsters=False)
for being in [t.being for t in level.values() if t.being and self.player.vision.can_see(t)]:
being.has_been_seen = True
return level