本文整理匯總了Python中Menu.Menu.update_menu方法的典型用法代碼示例。如果您正苦於以下問題:Python Menu.update_menu方法的具體用法?Python Menu.update_menu怎麽用?Python Menu.update_menu使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Menu.Menu
的用法示例。
在下文中一共展示了Menu.update_menu方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: randint
# 需要導入模塊: from Menu import Menu [as 別名]
# 或者: from Menu.Menu import update_menu [as 別名]
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
# deactivate shape if state become one, pop shape off the queue and