Commit 27e1e75a by BellCodeEditor

save project

parent dad371e8
Showing with 7 additions and 4 deletions
......@@ -5,10 +5,13 @@ from pygame import locals
pygame.init()
# 创建一个窗口
screen=pygame.display.set_mode((1280,720))
background=pygame.image.load("bg.png")
screen=pygame.display.set_mode((800,600))
while True:
for event in pygame.event.get():
print(event.type)
if event.type==4:
exit()
\ No newline at end of file
if event.type==12:
exit()
screen.blit(background,(0,0))
pygame.display.update()
\ 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