Commit 2625fe64 by BellCodeEditor

save project

parent 43ad8192
Showing with 5 additions and 3 deletions
...@@ -22,7 +22,7 @@ x, y = 240, 120 ...@@ -22,7 +22,7 @@ x, y = 240, 120
position = [(180, 90), (180, 120), (210, 120), (x, y)] position = [(180, 90), (180, 120), (210, 120), (x, y)]
apple_x = 360 # 苹果横坐标 apple_x = 360 # 苹果横坐标
apple_y = 300 # 苹果纵坐标 apple_y = 300 # 苹果纵坐标
mf=pygame.font.Font('neuropol.ttf') mf=pygame.font.Font('neuropol.ttf',18)
fs=0 fs=0
setheading = "right" setheading = "right"
...@@ -76,8 +76,9 @@ while True: ...@@ -76,8 +76,9 @@ while True:
# 将果实画上去 # 将果实画上去
screen.blit(food, (apple_x, apple_y)) screen.blit(food, (apple_x, apple_y))
text=mf.render(info,True,(0,0,0)) info='score'+str(fs)
screen.blit() text=mf.render(info,True,(0,0,10))
screen.blit(text,(540,10))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(3) FPSCLOCK.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