Commit a5b11cec by BellCodeEditor

save project

parent 5e708611
Showing with 4 additions and 1 deletions
...@@ -24,6 +24,8 @@ hero = [pygame.image.load('hero1.png'), ...@@ -24,6 +24,8 @@ 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')]
music = pygame.audio.load('score.wav')
index = 0 index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
...@@ -111,7 +113,8 @@ while True: ...@@ -111,7 +113,8 @@ while True:
score += sprite(score) score += sprite(score)
sprite = 0 sprite = 0
if if score > old_score:
audio.score.play()
# 创建障碍物对象 # 创建障碍物对象
Group(obstacle = Block(bush,stone,cacti)) Group(obstacle = Block(bush,stone,cacti))
......
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