Commit 5813415f by BellCodeEditor

save project

parent 01300df9
Showing with 8 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')]
score audio = Player.mixer.sound('score.audio.play')
index = 0 index = 0
y = 400 y = 400
...@@ -121,10 +122,16 @@ while True: ...@@ -121,10 +122,16 @@ while True:
score += sprite.score score += sprite.score
sprite.score = 0 sprite.score = 0
music_score.play()
scoreSurf=basic_font.render("分数")
#分数 #分数
scoreSurf = basic_font.render("分数:"+str(score),True,(255,0,0)) scoreSurf = basic_font.render("分数:"+str(score),True,(255,0,0))
screen.blit(scoreSurf,(850,20)) screen.blit(scoreSurf,(850,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