Exemplo n.º 1
0
                    music_game.stop()

                    play_sound(level_complete)

                    sleep(2)
                    continue_final = True
                    play = False

                    # Score attribution according to level
                    if file_level == file_level1:
                        player_scores[player_name] += 2
                    if file_level == file_level2:
                        player_scores[player_name] += 4

            game_map.display_structure()
            game_map.display_coins(list_coins)

            window.blit(mario.mario_image, mario.position_mario)
            pygame.display.flip()

            # Final screen
            while continue_final:
                # Limitation of loop speed
                pygame.time.Clock().tick(30)

                display_image(image_final)

                for event in pygame.event.get():

                    if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
                        continue_final = False