Commit 57911d8c by BellCodeEditor

save project

parent 6df5d85b
Showing with 12 additions and 9 deletions
......@@ -13,22 +13,25 @@ up=pygame.image.load('up.png')
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
FPS=pygame.time.Clock()
a=240
x,y=240,120
position=[(270,150),(270,120),(270,90),(240,90),(x,y)]
while True:
a+=30
for event in pygame.event.get():
print(event)
if event.type == locals.QUIT:
exit()
x+=30
position.append((x,y))
position.pop(0)
screen.blit(bg,(0,0))
screen.blit(right,(a,120))
screen.blit(body,(a-30,120))
screen.blit(body,(a-60,120))
screen.blit(body,(a-90,90))
screen.blit(apple,(a--30,120))
screen.blit(right,(x,y))
for i in range(len(position)-1):
screen.blit(body,position[i])
#screen.blit(body,(a-30,120))
#screen.blit(body,(a-60,120))
#screen.blit(body,(a-90,120))
screen.blit(apple,(360,120))
pygame.display.update()
FPS.tick(3)
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