Commit 638544a0 by BellCodeEditor

save project

parent 8b63abee
Showing with 6 additions and 4 deletions
...@@ -2,6 +2,7 @@ import pygame ...@@ -2,6 +2,7 @@ import pygame
pygame.init() pygame.init()
a=pygame.display.set_mode((800,600)) a=pygame.display.set_mode((800,600))
time=pygame.time.Clock() time=pygame.time.Clock()
we=[(300,180)(330,210)(360,240)(390,270)]
x,y=300,150 x,y=300,150
while True: while True:
for i in pygame.event.get(): for i in pygame.event.get():
...@@ -10,8 +11,8 @@ while True: ...@@ -10,8 +11,8 @@ while True:
x+=-30 x+=-30
a.blit(pygame.image.load('bg.png'),(0,0)) a.blit(pygame.image.load('bg.png'),(0,0))
a.blit(pygame.image.load('apple.png'),(90,120)) a.blit(pygame.image.load('apple.png'),(90,120))
a.blit(pygame.image.load('left.png'),(x,y)) a.blit(pygame.image.load('left.png'),we(0))
a.blit(pygame.image.load('body.png'),(x+30,y)) a.blit(pygame.image.load('body.png'),we(1))
a.blit(pygame.image.load('body.png'),(x+60,y)) a.blit(pygame.image.load('body.png'),we(2))
a.blit(pygame.image.load('body.png'),(x+90,y)) a.blit(pygame.image.load('body.png'),we(3))
pygame.display.update() pygame.display.update()
\ 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