本文整理汇总了Python中level.Level.number方法的典型用法代码示例。如果您正苦于以下问题:Python Level.number方法的具体用法?Python Level.number怎么用?Python Level.number使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类level.Level
的用法示例。
在下文中一共展示了Level.number方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_level
# 需要导入模块: from level import Level [as 别名]
# 或者: from level.Level import number [as 别名]
def make_level(self, x, y):
level = Level(x, y, self)
#count level from 0 NOT 1
level.number = len(self.level_list)
#group for render & collide
self.platfrom_group.add(level.platform)
print('level maked!!!')
return level
示例2: load_music
# 需要导入模块: from level import Level [as 别名]
# 或者: from level.Level import number [as 别名]
if pig.life <= 0:
pigs_to_remove.append(pig)
for pig in pigs_to_remove:
space.remove(pig.shape, pig.shape.body)
pigs.remove(pig)
# bird and pigs
space.add_collision_handler(0, 1).post_solve=post_solve_bird_pig
# bird and wood
space.add_collision_handler(0, 2).post_solve=post_solve_bird_wood
# pig and wood
space.add_collision_handler(1, 2).post_solve=post_solve_pig_wood
load_music()
level = Level(pigs, columns, beams, space)
level.number = 0
level.load_level()
while running:
# Input handling
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
elif event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE:
running = False
elif event.type == pygame.KEYDOWN and event.key == pygame.K_w:
# Toggle wall
if wall:
space.remove(static_lines1)
wall = False
else: