Commit d23d4248 by BellCodeEditor

save project

parent 147c659c
Showing with 9 additions and 0 deletions
import pygame#调用pygame模块
from pygame import locals #从模块中调用locals
pygame.display.set_mode((800,600))#设置窗口大小
while True:#死循环
for event in pygame.event.get(): #event管理来自各种输入设备和窗口平台的传入事件。
print(event)#打印
if event.type == locals.QUIT: #QUIT 对应窗口的关闭按钮
exit()#退出程序
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment