Commit df7818de by BellCodeEditor

auto save

parent cf0132ec
Showing with 7 additions and 1 deletions
......@@ -41,6 +41,10 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero3.png'),
pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')]
score_audio = pygame.mixer.Sound('score.wav')
basic_font = pygame.font.Font('STKAITI.TTF',32)
index = 0
y = 400
......@@ -121,7 +125,9 @@ while True:
if (sprite.rect.x + sprite.rect.width) < wukong.rect.x:
score += sprite.score
sprite.score = 0
if score > old_score:
score_audio.play()
old_score = score
scoreSurf = basic_font.render("分数:"+str(score),True,(255,0,0))
......
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