Commit 3895363c by BellCodeEditor

save project

parent 744c3502
Showing with 4 additions and 6 deletions
...@@ -6,12 +6,12 @@ pygame.init() ...@@ -6,12 +6,12 @@ pygame.init()
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((660, 480)) screen = pygame.display.set_mode((660, 480))
FPSLOCK=pygame.time.Clock()
# 背景 # 背景
background = pygame.image.load('bg.png') background = pygame.image.load('bg.png')
right = pygame.image.load('right.png') right = pygame.image.load('body.png')
food = pygame.image.load('apple.png') food = pygame.image.load('apple.png')
body = pygame.image.load('body.png') body = pygame.image.load('right.png')
x,y =240,120 x,y =240,120
position=[(180,90),(180,120),(210,120),(x,y)] position=[(180,90),(180,120),(210,120),(x,y)]
...@@ -30,7 +30,6 @@ while True: ...@@ -30,7 +30,6 @@ while True:
for i in range(len(position)-1): for i in range(len(position)-1):
screen.blit(body,position[i]) screen.blit(body,position[i])
screen.bilt(food,(360,300)) screen.blit(food,(360,300))
pygame.display.update() pygame.display.update()
FPSLOCK.tick(3) FPSLOCK.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