Commit 0ff4a7c6 by BellCodeEditor

save project

parent e0039c18
Showing with 4 additions and 4 deletions
...@@ -13,7 +13,7 @@ background = pygame.image.load('bg.png') ...@@ -13,7 +13,7 @@ background = pygame.image.load('bg.png')
right = pygame.image.load('right.png') right = pygame.image.load('right.png')
food = pygame.image.load('apple.png') food = pygame.image.load('apple.png')
body = pygame.image.load('body.png') body = pygame.image.load('body.png')
fps=pygame.time.clock() fps=pygame.time.Clock()
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -24,7 +24,7 @@ while True: ...@@ -24,7 +24,7 @@ while True:
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
# 将贪吃蛇画上去 # 将贪吃蛇画上去
screen.blit(right, (240, 120)) screen.blit(right, (x, y))
# 将贪吃蛇的身体画上去 # 将贪吃蛇的身体画上去
screen.blit(body, (210, 120)) screen.blit(body, (210, 120))
screen.blit(body, (180, 120)) screen.blit(body, (180, 120))
...@@ -34,4 +34,4 @@ while True: ...@@ -34,4 +34,4 @@ while True:
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
fps.tick(3) fps.tick(50)
\ No newline at end of file \ 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