macOS上启动pygame的问题在互联网上找不到任何东西

问题描述 投票:0回答:1

我运行程序时没有语法问题或任何错误,只是一个问题

import pygame
pygame.init()
# generate window
pygame.display.set_caption("shooter Game")
pygame.display.set_mode((1080, 720))
running = True
while running:
  # if the player close the window
   for event in pygame.event.get():
      if event.type == pygame.QUIT:
        running = False
        pygame.quit()
        print("game closed")

sceenshot of the code and the 🚀 of python that not stoping to jump

python pygame pycharm macos-catalina python-3.8
1个回答
1
投票

您无需更新显示,而不必pygame.display.update()您可以在pygame.display.set_mode((1080, 720))之后添加尝试这样,告诉我是否可行:)

© www.soinside.com 2019 - 2024. All rights reserved.