Commit fcf8b948 by BellCodeEditor

auto save

parent fc69fceb
Showing with 3 additions and 3 deletions
...@@ -4,15 +4,15 @@ from pygame import locals ...@@ -4,15 +4,15 @@ from pygame import locals
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((660,480)) screen = pygame.display.set_mode((720,540))
#用while True语句,让窗口一直保存。如果按下×,则窗口退出。
background=pygame.image.load('bg.png') background=pygame.image.load('bg.png')
right=pygame.image.load('right.png') right=pygame.image.load('right.png')
apple=pygame.image.load('apple.png') apple=pygame.image.load('apple.png')
body=pygame.image.load('body.png') body=pygame.image.load('body.png')
#用while True语句,让窗口一直保存。如果按下×,则窗口退出。
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
......
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