据我所知,pygame.display
是Electron 游戏的主要展示窗口.那么为什么pygame.display.fill()
不能在我下面的代码中工作呢?
import pygame
pygame.init()
SCREEN_LENGTH = 800
SCREEN_WIDTH = 600
screen = pygame.display.set_mode((SCREEN_LENGTH, SCREEN_WIDTH))
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
# change the background color
**pygame.display.fill((0, 0, 255))**
pygame.display.update()
pygame.quit()