Commit 323349d2 by BellCodeEditor

save project

parent fbf40d32
Showing with 8 additions and 1 deletions
......@@ -18,12 +18,14 @@ down = pygame.image.load('down.png')
up = pygame.image.load('up.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
my_font=pygame.font.Font('neuropol.ttf',18)
x,y=240, 120
z=[(180, 90),(180, 120),(210, 120),(x,y)]
fx='right'
fx_t=right
apple_x,apple_y=360, 300
score=0
while True:
for event in pygame.event.get():
......@@ -62,6 +64,7 @@ while True:
a_y=random.randint(0,15)
apple_x=a_x*30
apple_y=a_y*30
score+=10
else:
z.pop(0)
......@@ -75,7 +78,11 @@ while True:
# 将果实画上去
screen.blit(food, (apple_x,apple_y))
f.tick(3)
info='Score'+str(score)
test=my_font.render(info,True,(0,0,0))
screen.blit(test,(540,10))
f.tick(8)
# 刷新画面
pygame.display.update()
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