Commit e133f584 by BellCodeEditor

auto save

parent 5631f502
Showing with 8 additions and 4 deletions
...@@ -5,10 +5,15 @@ from pygame import locals ...@@ -5,10 +5,15 @@ from pygame import locals
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((800,600)) screen = pygame.display.set_mode((600,400))
#载入图片
bg = pygame.image.load('bg.png')
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
print(event.type) #print(event)
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
\ No newline at end of file
#渲染图片
screen.blit(bg,(0,0))
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