📜  基本 pygame 窗口 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:11.530000             🧑  作者: Mango

代码示例1
import pygame
pygame.init()

WIDTH, HEIGHT = 500, 500
WIN = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Hello World!")

run = True
while run:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      run = False
      break

pygame.quit()