本文整理匯總了Python中Menu.Menu.help_screen方法的典型用法代碼示例。如果您正苦於以下問題:Python Menu.help_screen方法的具體用法?Python Menu.help_screen怎麽用?Python Menu.help_screen使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Menu.Menu
的用法示例。
在下文中一共展示了Menu.help_screen方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: main
# 需要導入模塊: from Menu import Menu [as 別名]
# 或者: from Menu.Menu import help_screen [as 別名]
#.........這裏部分代碼省略.........
main_world.game_over = False
try:
main_world.set_up_level(main_world.levels[main_world.level_index])
except IndexError:
main_world.level_index = 0
main_world.set_up_level(main_world.levels[main_world.level_index])
elif option == 2:
"""level select"""
current_state = "level select"
elif option == 3:
"""help"""
current_state = "help"
elif option == 4:
"""links"""
current_state = "links"
elif option == 5:
"""credits"""
current_state = "credits"
elif option == 6:
"""quit"""
done = True
main_menu.render(screen)
screen.blit(menu_cursor_image, (mouse_pos[0]-16, mouse_pos[1]-16))
pygame.display.flip()
elif current_state == "help":
main_menu.help_screen(screen,mouse_pos)
pressed_keys = pygame.key.get_pressed()
if pressed_keys[pygame.K_ESCAPE]:
current_state = "menu"
pygame.display.flip()
elif current_state == "links":
if main_menu.links(screen,mouse_pos,time_passed_seconds) == "link":
current_state = "menu"
pressed_keys = pygame.key.get_pressed()
if pressed_keys[pygame.K_ESCAPE]:
current_state = "menu"
pygame.display.flip()
elif current_state == "level select":
selected_level = main_menu.level_select(screen, mouse_pos, time_passed_seconds, main_world)
if selected_level is not None:
current_state = "game"
main_world.game_over = False
pygame.mixer.music.stop()
main_world.set_up_level(selected_level)
main_world.level_index = main_world.levels.index(selected_level)
pressed_keys = pygame.key.get_pressed()
if pressed_keys[pygame.K_ESCAPE]:
current_state = "menu"
pygame.display.flip()
elif current_state == "credits":
main_menu.credits(screen,mouse_pos,time_passed_seconds)
pressed_keys = pygame.key.get_pressed()
if pressed_keys[pygame.K_ESCAPE]:
current_state = "menu"