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
无效后中断。