Ejemplo n.º 1
0
current_track = menu.track
pygame.mixer.init(44100)
if (pygame.mixer.get_init()):
    pygame.mixer.music.load(current_track)
    pygame.mixer.music.play(-1)


while (menu.current_state >= 0):    
    for event in pygame.event.get(): 
        if event.type == pygame.QUIT: 
            menu.current_state = -1
            
    localGame = LocalGame(1, menu.diff, screen, menu)
    
    if (menu.current_state == 0):
        menu.run_menu_page(screen)
        
    elif (menu.current_state == 1):
        localGame.mode = 1
        localGame.run_game()
        
    elif (menu.current_state == 2):
        localGame.mode = 2
        localGame.run_game()

    elif (menu.current_state ==3):
        # Should determine whether or not there is already a host
        # on the LAN. If not, player becomes host and waits for someone to join.
        # Otherwise, player is client and joins host game.
        pass