Commit 6c4fc494 by BellCodeEditor

save project

parent 37652880
Showing with 7 additions and 3 deletions
......@@ -67,6 +67,7 @@ while True:
if event.key == locals.K_SPACE:
jumpState = "up"
speed = 8+score//3
# 悟空造型
wukong = Player(hero[index])
if jumpState == "runing": # 跑步状态下
......@@ -124,10 +125,13 @@ 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,255,255))
screen.blit(scoreSurf,(880,20))
# 刷新画面
pygame.display.update()
FPS.tick(60)
\ No newline at end of file
FPS.tick(70)
\ 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