Commit bc9fbc65 by BellCodeEditor

save project

parent b68b6802
Showing with 5 additions and 1 deletions
File added
File added
......@@ -17,7 +17,8 @@ body = pygame.image.load('body.png')
left = pygame.image.load('left.png')
up = pygame.image.load('up.png')
down = pygame.image.load('down.png')
font = pygame.font.Font('segoesc.ttf',18)
score = 0
x, y =240,120
body2 = [(180,90),(180,120),(210,120),(x, y)]
......@@ -71,6 +72,8 @@ while True:
screen.blit(body, body2[i])
# 将果实画上去
screen.blit(food, (apple_x, apple_y))
info = "Score"+str(score)
text = font.render(info,True,(0,255,0))
# 刷新画面
pygame.display.update()
Time.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