Commit 64fc484d by BellCodeEditor

auto save

parent df2edfb9
Showing with 5 additions and 1 deletions
......@@ -10,11 +10,14 @@ screen = pygame.display.set_mode((660, 480))
TIME=pygame.time.Clock()
# 背景
background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
x,y=240,120
up=pygame.image.load('up.png')
down=pygame.image.load('down.png')
x,y=240,
while True:
for event in pygame.event.get():
......@@ -22,6 +25,7 @@ while True:
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
if event.type==locals.KEYDOWN:
x=x+30
position.append((x,y))
position.pop(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