Commit a5813387 by BellCodeEditor

auto save

parent 6df7c48c
Showing with 9 additions and 11 deletions
...@@ -15,25 +15,23 @@ screen = pygame.display.set_mode((660, 480)) ...@@ -15,25 +15,23 @@ screen = pygame.display.set_mode((660, 480))
# 背景 # 背景
background = pygame.image.load('bg.png') background = pygame.image.load('bg.png')
left = pygame.image.load('left.png')
up = pygame.image.load('up.png')
down = pygame.image.load('down.png')
right = pygame.image.load('right.png') right = pygame.image.load('right.png')
food = pygame.image.load('apple.png') food = pygame.image.load('apple.png')
body = pygame.image.load('body.png') body = pygame.image.load('body.png')
up = pygame.image.load()
fps = pygame.time.Clock() fps = pygame.time.Clock()
setheading = right
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.up: if event.type == locals.KRYDOWN:
y-=30 y+=300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
elif event.type == locals.down: if event.type == locals.KEYUP:
y+=30 y-=300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
elif event.type == locals.left:
x-=30
else event.type == locals.right:
x+=30
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
x+=30 x+=30
SHENTI.append((x,y)) SHENTI.append((x,y))
......
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