Commit f01890ee by BellCodeEditor

save project

parent f065bf3c
Showing with 14 additions and 15 deletions
......@@ -4,6 +4,10 @@ from pygame import locals
pygame.init()
# 创建一个窗口
x = 240
y = 120
c = pygame.time.Clock()
l = [(210,180),(210,150),(210,120),(x,y)]
a = pygame.display.set_mode((660,480))
right = pygame.image.load("right.png")
bg = pygame.image.load("bg.png")
......@@ -15,18 +19,13 @@ while True:
if i.type == locals.QUIT:
exit()
x += 30
l.append((x,y))
l.pop(0)
a.blit(bg,(0,0))
a.blit(right,(240,120))
a.blit(body,(210,120))
a.blit(body,(180,120))
a.blit(body,(180,150))
a.blit(body,(180,180))
a.blit(body,(150,180))
a.blit(body,(150,210))
a.blit(body,(150,240))
a.blit(body,(120,240))
a.blit(body,(90,240))
a.blit(body,(60,240))
a.blit(body,(60,270))
a.blit(apple,(150,150))
pygame.display.update()
\ No newline at end of file
a.blit(right,l[-1])
for i in range((len(l)-1)):
a.blit(body,l[i])
a.blit(apple,(300,300))
pygame.display.update()
c.tick(3)
\ 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