Commit a9f63ccd by BellCodeEditor

save project

parent 6dcd3412
Showing with 5 additions and 1 deletions
...@@ -7,15 +7,19 @@ bg=pygame.image.load('bg.png') ...@@ -7,15 +7,19 @@ bg=pygame.image.load('bg.png')
head=pygame.image.load('right.png') head=pygame.image.load('right.png')
apple=pygame.image.load('apple.png') apple=pygame.image.load('apple.png')
body=pygame.image.load('body.png') body=pygame.image.load('body.png')
x,y=240,120
CLOCK=pygame.time.Clock()
# 创建一个窗口 # 创建一个窗口
a=pygame.display.set_mode((660,480)) a=pygame.display.set_mode((660,480))
while True: while True:
CLOCK.tick(3)
for i in pygame.event.get(): for i in pygame.event.get():
if(i.type==locals.QUIT): if(i.type==locals.QUIT):
exit() exit()
x=x+30
a.blit(bg,(0,0)) a.blit(bg,(0,0))
a.blit(head,(240,120)) a.blit(head,(x,y))
a.blit(apple,(330,360)) a.blit(apple,(330,360))
a.blit(body,(210,120)) a.blit(body,(210,120))
a.blit(body,(180,120)) a.blit(body,(180,120))
......
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