Commit 641a3b69 by BellCodeEditor

save project

parent c82a9f0b
Showing with 3 additions and 2 deletions
...@@ -116,8 +116,9 @@ while True: ...@@ -116,8 +116,9 @@ while True:
screen.blit(gameover, (400, 200)) screen.blit(gameover, (400, 200))
gamestate = False gamestate = False
else: else:
if sprite.rect.x + sprite.rect.windth<wukong.rect.x: if sprite.rect.x + sprite.rect.width<wukong.rect.x:
score += sprite.score score += sprite.score
sprite.score = 0
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))
......
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