Commit 3c797246 by BellCodeEditor

save project

parent e9f2d1c3
Showing with 10 additions and 2 deletions
...@@ -16,6 +16,8 @@ pingmu = pygame.display.set_mode((660,480)) ...@@ -16,6 +16,8 @@ pingmu = pygame.display.set_mode((660,480))
x=270 x=270
y=240 y=240
postion = [(210,240),(240,240),(x,y)]
fps = pygame.time.Clock() fps = pygame.time.Clock()
while True: while True:
...@@ -24,10 +26,15 @@ while True: ...@@ -24,10 +26,15 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
x+=30 x+=30
postion.append((x,y))
postion.pop(0)
pingmu.blit(backgroung,(0,0)) pingmu.blit(backgroung,(0,0))
pingmu.blit(apple,(360,330)) pingmu.blit(apple,(360,330))
pingmu.blit(right,(x,y)) pingmu.blit(right,(x,y))
pingmu.blit(body,(240,240)) for i in range(len(postion)-1):
pingmu.blit(body,(210,240)) pingmu.blit(body,(postion[i]))
#pingmu.blit(body,(240,240))
#pingmu.blit(body,(210,240))
pygame.display.update() pygame.display.update()
fps.tick(5) fps.tick(5)
\ 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