Commit 03c878a3 by BellCodeEditor

save project

parent 2da0b7cb
Showing with 11 additions and 6 deletions
......@@ -5,19 +5,24 @@ pygame.init()
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
FPSCLOCK=pygame.time.Clock()
a=pygame.image.load('bg.png')
e=pygame.image.load('bg.png')
b=pygame.image.load('right.png')
c=pygame.image.load('apple.png')
d=pygame.image.load('body.png')
x,y=240,180
x,y=270,120
a=[(180,120),(210,120),(240,120),(x,y)]
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
x+=30
screen.blit(a,(0,0))
screen.blit(b,(x,y))
screen.blit(c,(240,120))
screen.blit(d,(210,180))
a.append((x,y))
a.pop(0)
screen.blit(e,(0,0))
screen.blit(b,a[-1])
for i in range(len(a)-1):
screen.blit(d,a[i])
screen.blit(c,(360,380))
pygame.display.update()
FPSCLOCK.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