Commit 2eaa7e9a by BellCodeEditor

save project

parent 1da56ad6
Showing with 4 additions and 0 deletions
...@@ -40,6 +40,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -40,6 +40,7 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero3.png'), pygame.image.load('hero3.png'),
pygame.image.load('hero4.png'), pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')] pygame.image.load('hero5.png')]
basic_font = pygame.font.Font('STKAIII.TTF',18)
index = 0 index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
...@@ -120,5 +121,7 @@ while True: ...@@ -120,5 +121,7 @@ while True:
score += sprite.score score += sprite.score
sprite.score = 0 sprite.score = 0
# 刷新画面 # 刷新画面
scoreSurf = basic_font.render('Score:'+str(score),True,(255,255))
screen.bilt(scoreSurf,(880,20))
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(60)
\ 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