本文整理汇总了Python中Menu.Menu.draw_menu方法的典型用法代码示例。如果您正苦于以下问题:Python Menu.draw_menu方法的具体用法?Python Menu.draw_menu怎么用?Python Menu.draw_menu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu.Menu
的用法示例。
在下文中一共展示了Menu.draw_menu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from Menu import Menu [as 别名]
# 或者: from Menu.Menu import draw_menu [as 别名]
for i in range(5):
shape_queue.append(randint(0,6))
shape_color=(randint(1,255), randint(1,255), randint(1,255))
# creates a new shape: 0 is the shape id
shape = Shape(shape_color, shape_queue[0])
# init Heads up Display
hud = Hud(width, height)
gameOver=Gameover(width,height,area.score)
# redraws the screen with the black background hud and menu
screen.fill((0,0,0))
hud.draw(screen)
menu=Menu(width,height)
menu.draw_menu(screen)
menu.update_menu(screen)
pygame.display.flip()
# moves the selector box around the menu
menu_input()
# initializes the ticker and starts moving the blocks after ~1s elapsed.
init = 1000
start_time = pygame.time.get_ticks()
# Single Player Looop
while menu.singlePlayer and shape.game_state:
check_input()
time = pygame.time.get_ticks() - start_time