本文整理汇总了Python中Menu.playerSelect方法的典型用法代码示例。如果您正苦于以下问题:Python Menu.playerSelect方法的具体用法?Python Menu.playerSelect怎么用?Python Menu.playerSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu.playerSelect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Main
# 需要导入模块: import Menu [as 别名]
# 或者: from Menu import playerSelect [as 别名]
def Main():
# Create initial game instance
menu = Menu()
game = None
while True:
# Clear surface
pygame.display.get_surface().fill((255, 255, 255))
# Pause when we are not ingame
if app_state.state != "Game":
pygame.mixer.music.pause()
if app_state.state == "Game":
game.update()
game.draw()
pygame.mixer.music.unpause()
elif app_state.state == "Menu":
menu.index()
elif app_state.state == "Rules":
menu.rules()
elif app_state.state == "Options":
menu.options()
elif app_state.state == "PlayerSelect":
menu.playerSelect()
elif app_state.state == "GameStart":
game = Game(app_state.player_amount)
app_state.state = "Game"
elif app_state.state == "Pause":
game.screen_pause()
elif app_state.state == "Won":
game.screen_winner()
event_handler.run()