sp10

来源:互联网 发布:日语翻译软件 知乎 编辑:程序博客网 时间:2024/06/05 08:46
if lives <1:
            text_surf = init_font(FONTPATH,32,"YOU LOSE!",GREEN,BLUE)
            draw_font(text_surf,DISPLAYSURF,WINDOWWIDTH/2-text_surf.get_rect().width/2,WINDOWHEIGHT/2-text_surf.get_rect().height/2)
            fontObj = pygame.font.Font(FONTPATH1, 32)
            draw_bar(BAR,lives)
            pygame.display.update()
            lives = LIVES
            pygame.time.wait(1000)
            init_boxs_revealed(boxs)
            #shuffle_boxs_color(boxs)
      
        if is_won(boxs):
            text_surf = init_font(FONTPATH,32,"YOU WON!",GREEN,BLUE)
            draw_font(text_surf,DISPLAYSURF,WINDOWWIDTH/2-text_surf.get_rect().width/2,WINDOWHEIGHT/2-text_surf.get_rect().height/2)
            draw_bar(BAR,lives)
            pygame.display.update()
            lives = LIVES
            pygame.time.wait(1000)
            init_boxs_revealed(boxs)
            shuffle_boxs(boxs,20)
       
        pygame.display.update()
        FPSCLOCK.tick(FPS)
       
if __name__ == '__main__':
    main()
原创粉丝点击