我已经编写了这段代码,但遇到了一些问题:
import pygame pygame.init() screen = pygame.display.set_mode((800,600)) running = True while running: for event in pygame.event.get(): if event.type == pygame.quit(): running = False
5gfr0r5j1#
将if event.type == pygame.quit():更改为if event.type == pygame.QUIT:
if event.type == pygame.quit():
if event.type == pygame.QUIT:
1条答案
按热度按时间5gfr0r5j1#
将
if event.type == pygame.quit():
更改为if event.type == pygame.QUIT: