ipygame.error:视频系统未初始化

时间:2018-10-21 19:45:16

标签: python

 while True:  # if touch the key board
        for event in pygame.event.get():  # event handling loop
            if event.type == QUIT:
               pygame.quit()  # close the game
            elif event.type == KEYDOWN:
                if (event.key == K_ESCAPE):  # if press ESC ,close the game
                    pygame.quit()
                else:
                    return  # start the game

如何更改我的代码?我想我没有打破while循环。我怎样才能做到这一点? pygame.quit无效后中断。

0 个答案:

没有答案
相关问题